digitalmars.D - [sugar] when all hell breaks loose
- Manfred Nowak (29/29) Aug 21 2005 From the specs:
- Factory (10/14) Aug 21 2005 "Greenspun's Tenth Rule of Programming: any sufficiently
- Jarrett Billingsley (3/8) Aug 21 2005 aaaaaaAAAAAAAAAAHHHHHHHHHHHHHHH!!!!!!
- Manfred Nowak (23/24) Aug 22 2005 I understand your squealing with glee for the things to come.
- David Medlock (3/38) Aug 22 2005 That is starting to look like Forth, with dots instead of spaces...
- Hasan Aljudy (2/37) Aug 22 2005 I think this reduces readability to the ground.
From the specs: | Features To Drop [...] | Distinction between . and ->. This distinction is really not | necessary. The . operator serves just as well for pointer | dereferencing. | Class and Struct Properties | Properties are member functions that can by syntactically | treated as if they were fields. {parenthesis are not needed} Without turning a hair most D-guys are using these features. And Walter was right to drop this frumpy conventions that seems to have been intodruced by some sort of reminescense to BASIC, where you always have to assure that you are working with a string variable by appending a `$' to its name. But why stop at this point(!)? When its clear from the definition of the identifier, then there is no need to always state `I know, that this is something like a function, like an array, like a field, like a pointer ...' Furthermore the imagination, that an instance of a class acts for example like an array is pure virtual since the class can despite of the opIndex's have opCall's, opSlice, ... Therefore we are using only more of this frumpy conventions Walter already has dropped for us: lets get rid of () and [] when they are not really needed and a point suffices: `sin.pi' instead of `sin( pi)' `arr.1' instead of `arr[ 1]' `assure.where.isContained.' instead of `assure( where( isContained()))' -manfred :-)
Aug 21 2005
In article <de9n3m$pao$1 digitaldaemon.com>, svv1999 hotmail.com says...`sin.pi' instead of `sin( pi)' `arr.1' instead of `arr[ 1]' `assure.where.isContained.' instead of `assure( where( isContained()))'"Greenspun's Tenth Rule of Programming: any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp." Well one would only have to change the wording a bit. - Factory, not that I wouldn't mind a bit of lisp in D
Aug 21 2005
"Manfred Nowak" <svv1999 hotmail.com> wrote in message news:de9n3m$pao$1 digitaldaemon.com...`sin.pi' instead of `sin( pi)' `arr.1' instead of `arr[ 1]' `assure.where.isContained.' instead of `assure( where( isContained()))' -manfred :-)aaaaaaAAAAAAAAAAHHHHHHHHHHHHHHH!!!!!!
Aug 21 2005
"Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote: [...]aaaaaaAAAAAAAAAAHHHHHHHHHHHHHHH!!!!!!I understand your squealing with glee for the things to come. Lets have a look at the sources that will be coming with dmd after that change: std.file: line 476: if .!callback.std.utf.toUTF8.fileinfo.cFileName.0..clength line 851: if .std.c.linux.linux.chdir.toStringz.pathname std.boxer: line 663: assert .unboxable!.char. .box."foobar"; std.socket: line 626: return ntohl.inet_addr.std.string.toStringz.addr; std.windows: line 2521: LPSTR MAKEINTRESOURCEA.int i{ return cast.LPSTR cast.DWORD cast.WORD i; } Brave new world. -manfred :-)
Aug 22 2005
Manfred Nowak wrote:"Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote: [...]That is starting to look like Forth, with dots instead of spaces... -DavidMaaaaaaAAAAAAAAAAHHHHHHHHHHHHHHH!!!!!!I understand your squealing with glee for the things to come. Lets have a look at the sources that will be coming with dmd after that change: std.file: line 476: if .!callback.std.utf.toUTF8.fileinfo.cFileName.0..clength line 851: if .std.c.linux.linux.chdir.toStringz.pathname std.boxer: line 663: assert .unboxable!.char. .box."foobar"; std.socket: line 626: return ntohl.inet_addr.std.string.toStringz.addr; std.windows: line 2521: LPSTR MAKEINTRESOURCEA.int i{ return cast.LPSTR cast.DWORD cast.WORD i; } Brave new world. -manfred :-)
Aug 22 2005
Manfred Nowak wrote:"Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote: [...]I think this reduces readability to the ground.aaaaaaAAAAAAAAAAHHHHHHHHHHHHHHH!!!!!!I understand your squealing with glee for the things to come. Lets have a look at the sources that will be coming with dmd after that change: std.file: line 476: if .!callback.std.utf.toUTF8.fileinfo.cFileName.0..clength line 851: if .std.c.linux.linux.chdir.toStringz.pathname std.boxer: line 663: assert .unboxable!.char. .box."foobar"; std.socket: line 626: return ntohl.inet_addr.std.string.toStringz.addr; std.windows: line 2521: LPSTR MAKEINTRESOURCEA.int i{ return cast.LPSTR cast.DWORD cast.WORD i; } Brave new world. -manfred :-)
Aug 22 2005