Whatever for? Haven't seen that since I stopped using VM/CMS.
Whatever for? Haven't seen that since I stopped using VM/CMS.
Wise guy.
Guilty as charged.
Cos I like it...very productive. Great for certain kinds of scripting. Available on all common platforms...
Icons aren't much use for screen readers. I don't suppose you consider anyone else.
If its event driven stuff that's wanted then lego mindstorms is pretty good. You can also program in other languages if you want.
Ha, I asked for that. I'm not normally a GUI programmer but I have (under duress, sort of) had to do some Java GUI work, which I found slightly painful. I've seen kids using Scratch & immediately thought "wow, the GUI threading is transparent, & the event handling is so easy!"
The Lego NXT 2 "standard" IDE doesn't do what looks to me like event-driven programming; you have to put in a lot of explicit loops like "repeat ... until touchSensor1.isPressed()", rather than sticking an event-handler off to one side of the rest of the code.
The one I bought my daughter was event driven but allowed loops. Maybe they changed it on the nw one, I can't justify buying one for myself.
In fairness to MS part of that is down to having to try and maintain compatibility with all sorts of software and hardware that may go back a decade or two. I think it's quite a remarkable achievement that Vista will run 1990 SuperBeam 1 and Windows 8, 1998 SuperBeam 4.0.
Raymond Chen's book 'The Old New Thing' is a wonderful insight into some of these challenges
as a games console with preloaded software...
?or was that a typo for 32K?
Indeed, plenty, but sometimes the charm of the old systems comes from the simplicity of interacting with the hardware.
Its funny how many languages tend to acquire a range of awkward looking and non intuitive constructs that crop up all over the place. The only justification for them often seems to be "because you can". The problem becomes self replicating because people learn from seeing examples that contain them and then use them since they are "normal".
I remember how much I hated learning (K&R style) C back in the '80s for similar reasons...
Yes its very concise to make an assignment in the body of an "if" statement, but really, it should be blindingly obvious its just an error waiting to happen!
(bit like that dodgy perl construct when people rely on the short circuit boolean evaluation to turn "something || function call" into a conditional call or exit. Just how difficult is it to type the word "if" and make it obvious what you are doing....?)
Well the whole inclusion of the variable within what appears to be a string literal is somewhat less obvious than the basic equivalent of
print "Number "; counter
With perl, I guess it is handy for in-line commands like:
perl -n -e 'print "Match: $_\n" if m/wibble/' < somefile
But I'd never use that shorthand in actual code.
The best thing for perl on a command line is:
perl -p -i -e 's/ReplaceThis/WithThis/g' aFile
in place editing. I never got on with tr,sed etc - I find perl easier.
print "Number " . $counter . "\n";
:)
Can anyone join in?
echo "Number $counter", PHP_EOL;
(has the advantage of an environment-dependent EOL character)
echo 'Number ' . $counter ...
Keeping variables out of strings (and using a single-quoted string) is better as PHP doesn't have to ferret through the string looking for special characters. Not that it matters in the example above.
Quite. But for ultimate efficiency some would stress the superiority of
echo 'Number ', $counter
so that the concatenation takes place in the print buffer rather than during expression evaluation.
But I really like the readability of interpolated variables, and I'll carry on doing it even if it does make the computer work a tiny tiny bit harder.
BTW I really hate "echo" when "print" would be more meaningful. It's true that PHP has a print function, but you can't chain expressions as in the last example above.
HomeOwnersHub website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.