We Don't Need No Education... - by fett
SubJeff on 11/3/2013 at 23:30
I think the "best method" would be not to have arbitrary names in the first place.
I'm not preaching though; I hash together stuff so it just works!
zombe on 12/3/2013 at 01:08
Quote Posted by Vivian
Ok, quick question - if you want to have a dynamic variable name based on some string list somewhere, how do you do that
without eval?
"var = 'foo' + 'bar'; blah[var] = 7;" is the same as "blah.foobar = 7;" where 'blah" is some relevant context. No need for eval. Or did you have something else in mind?
Phatose on 12/3/2013 at 01:24
As zombe pointed out, you can typically use array indexes or the equivalent. .Net has collections, I'm fairly certain java does too.
It's a bit more cumbersome, but it doesn't involve using eval - and that's a huge plus cause eval is tremendously dangerous. Like little Bobby tables, except it might be able to delete your whole hard drive, and not just your database.
Weak typing is one of those things that seems nice at first, but it's got problems that show up pretty quickly. Even if you discard all concerns coding practices, you still end up with the problem that your dev environment is going to be a hell of a lot less useful. The various shades of useful autocomplete - they call it intellisense in VS, don't know if it's got a general name - makes dealing with strongly typed classes a lot easier, simply because it lets the compiler suggest valid properties. Some environments will try to imply typing, but that's really hit or miss.
Then you have other concepts it's missing - method overloading is a big one, and you just can't do it at all in javascript.
fett on 12/3/2013 at 02:11
Damn I love this place.
Peanuckle on 12/3/2013 at 02:55
Man, I typed up this whole thing I thought would be helpful, then I went back and read the opening post, and it was totally irrelevant.
If you decide to teach a second language, I'd recommend Mexican-spanish or Chinese. Our closest neighbor and biggest market, respectively. I learned French in highschool and have met precisely 2 other people who spoke it, and they were really old folks whom I haven't seen since.
Although I heard a while ago that speaking Arabian could get you a good job with certain government agencies, but with the current political activity you might be better off learning Korean.
faetal on 12/3/2013 at 13:18
Quote Posted by fett
Damn I love this place.
University of TTLG - send your kids here ;)
"Module 3001: Professor Dethtoll illustrates the use of image files to punctuate and enhance dialectic"