Timeline for What useful expressiveness will be impossible in a language where an expression is not a statement?
Current License: CC BY-SA 3.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 13, 2012 at 23:18 | vote | accept | Carlo V. Dango | ||
| Aug 13, 2012 at 6:58 | history | edited | user7043 | CC BY-SA 3.0 | added 761 characters in body |
| Aug 12, 2012 at 17:52 | comment | added | user7043 | No, gotta keep them secret so I can implement a perfect killer language later ;) But I think Python is pretty sweet as mainstream language design goes, so if you care about my opinion, look at what they do. | |
| Aug 12, 2012 at 17:47 | comment | added | Carlo V. Dango | I am not sure what to think. First time I saw the construct I hated it. In the simple context of this 1-line program it looks like a sweet pearl :-) do you have a website where your language design opinions are posted? | |
| Aug 12, 2012 at 17:42 | comment | added | user7043 | @CarloV.Dango Terribly unclear in my opinion, and only saves you very little. I use either while (true) { c = readChar(); if (c == -1) break; ... } or c = readChar(); while (c != -1) { ...; c = readChar(); }. | |
| Aug 12, 2012 at 17:37 | comment | added | Carlo V. Dango | How about int c; while( (c=readChar()) != -1) { ... } | |
| Aug 12, 2012 at 17:33 | comment | added | user7043 | @CarloV.Dango That example isn't a bad idea, but that's because it's not an assignment, it's a declaration (coupled with initialization). A bad idea is while (a = b) (typo'd a == b, bad because it is wrong) and almost any case where you use a = b as part of a larger expression, because it does not properly shout "side effect". A possible exception (some people like it, some don't) us chained assignment like a = b = c. | |
| Aug 12, 2012 at 17:28 | comment | added | Carlo V. Dango | Very well put! Why is assignment a bad idea? eg. using(var conn = new DBConnection(..)) a bad idea? | |
| Aug 12, 2012 at 17:06 | history | answered | user7043 | CC BY-SA 3.0 |