digitalmars.D - Improve D's syntax to make it more python like
- Pedro Larroy (5/5) Mar 21 2014 Hi
- Timon Gehr (2/7) Mar 21 2014 http://delight.sourceforge.net/
- bearophile (5/8) Mar 21 2014 You have to revive this project to port it to D2:
- The Guest (4/12) Mar 21 2014 It's already in progress:
- bearophile (5/8) Mar 21 2014 Some design decision are bad, like "less" for "<", or the
- The Guest (3/11) Mar 21 2014 I agree with you. They should stick to PEP-3107 style "def add(a,
- Frustrated (4/9) Mar 21 2014 Why not just learn the correct syntax instead of perpetuating
- Russel Winder (14/17) Mar 21 2014 D syntax is of course less modern than that of Python: Python syntax is
- Frustrated (9/24) Mar 21 2014 Um, ALGOL was created in the early 60's of which python's spacing
- Timon Gehr (5/21) Mar 21 2014 =D.
- Russel Winder (12/22) Mar 22 2014 ALGOL60 had begin and end to delimit blocks, the indentation of the
- Brian Rogoff (12/15) Mar 22 2014 I've programmed in OCaml for many years and I somehow missed the
- Paulo Pinto (9/16) Mar 22 2014 When F# was still in beta, it had OCaml syntax as default with a
- Brian Rogoff (11/19) Mar 22 2014 That's not too hard to believe. I like OCaml a lot but its syntax
- bearophile (5/6) Mar 22 2014 See also:
- Russel Winder (15/31) Mar 22 2014 I appear to have typed OCaml when I meant Haskell, possibly because I am
- 1100110 (7/32) Mar 23 2014 I find I think of the type as an adjective, and since I'm only fluent in...
- Timon Gehr (3/9) Mar 23 2014 Exactly.
- 1100110 (2/13) Mar 23 2014
- Nick Sabalausky (9/15) Mar 23 2014 I like "type name;" order because I usually know the type I want (even
- evansl (6/8) Mar 22 2014 Brian, could you provide a link for this proposal?
- Brian Rogoff (12/21) Mar 22 2014 http://www.csse.monash.edu.au/~damian/papers/HTML/ModestProposal.html
- Iain Buclaw (2/14) Mar 22 2014 http://www.coboloncogs.org/INDEX.HTM
- Adam D. Ruppe (4/7) Mar 21 2014 I don't think it would be really hard to do in the compiler, you
- Russel Winder (10/11) Mar 21 2014 I would leave D syntax as it is. Python syntax is not hideous, it is
- Asman01 (5/10) Mar 21 2014 I don't think it's so difficult but it will increase a lot of
- Mason McGill (10/15) Mar 21 2014 What draws you to D, if not the syntax? If you're looking for a
- Paulo Pinto (9/26) Mar 21 2014 Dylan could have been a great language. A lisp for systems programming
- Brian Rogoff (23/39) Mar 21 2014 Definitely not the syntax!
- Brad Roberts (4/8) Mar 21 2014 Whether or not white space is significant is a _very_ subjective matter....
- w0rp (11/11) Mar 21 2014 A Python syntax wrapper around D is a fun thing. It's also
- Jonathan M Davis (10/15) Mar 21 2014 *shudder* Python is more like the antithesis of good syntax IMHO. Sure, ...
- H. S. Teoh (8/25) Mar 21 2014 [...]
- w0rp (4/10) Mar 21 2014 http://www.haskell.org/haskellwiki/Wadler%27s_Law
- Andrei Alexandrescu (10/20) Mar 21 2014 Well, one issue that's happening is that every so often github pull
- H. S. Teoh (7/30) Mar 21 2014 [...]
- Walter Bright (3/5) Mar 22 2014 Anyone can create a bugzilla account and/or a github account and get sta...
- H. S. Teoh (6/12) Mar 22 2014 I know that. :) I was alluding to motivating more forumites to
- Steve Teale (5/9) Mar 22 2014 Andrei,
- Andrei Alexandrescu (12/23) Mar 22 2014 Maintaining a list would be as much overhead as fixing the items on it.
- 1100110 (8/30) Mar 23 2014 You really want me to contribute? Cause I will.
- Marco Leise (5/6) Mar 23 2014 ... stickied ... in a NNTP news group ... :)
- 1100110 (3/7) Mar 23 2014 Haha, I just meant bump it so that it stays active.
- Ziad Hatahet (16/16) Mar 21 2014 I don't know if significant whitespace is actually "improving" the synta...
- Chris (12/40) Mar 25 2014 +1
- Jonathan M Davis (5/8) Mar 21 2014 I suspect that a lot of it just comes down to bikeshedding. Syntax is
- Andrei Alexandrescu (8/12) Mar 21 2014 Hey Pedro,
- Russel Winder (12/18) Mar 22 2014 I am not convinced. CoffeeScript as a JavaScript dialect hasn't really
- David Nadlinger (6/9) Mar 22 2014 Well, that depends on your definition of "taken off". If you were
- "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= (23/25) Mar 22 2014 Well, I don't know, Dart is in the same vein as CoffeeScript.
- Russel Winder (24/41) Mar 22 2014 On Sat, 2014-03-22 at 15:10 +0000, Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?=
- "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= (20/28) Mar 22 2014 Yes, a CLI/server Dart VM exists that is suitable for a http
- Nick Sabalausky (15/25) Mar 24 2014 Using the same language on client/server is indeed quite nice, partly
- "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= (16/27) Mar 24 2014 Yes, especially for data models. It is always annoying to modify
- Nick Sabalausky (21/43) Mar 25 2014 Yea, common data models was a very big use of shared server/client code
- Rikki Cattermole (8/74) Mar 25 2014 In semi related news, have you guys seen Cmsed? Built into the
- "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= (17/24) Mar 29 2014 I like the basic idea of Haxe since it in theory would allow
- MattCoder (7/11) Mar 22 2014 Please someone could show a little example of the quote above? I
- Adam D. Ruppe (15/18) Mar 22 2014 You would write a little program that sees changes of indentation
- Andrei Alexandrescu (9/18) Mar 22 2014 As simple as it gets. The program would translate files with extension
- Colden Cullen (9/31) Mar 22 2014 After far too many hours on a plane today, I ended up building
- bearophile (13/14) Mar 22 2014 Looks like a good start. I could even use that syntax in some
- Colden Cullen (4/12) Mar 28 2014 Turns out this already exists:
- logicchains (6/11) Mar 22 2014 It's interesting to see this being discussed, as somebody
- 1100110 (3/16) Mar 23 2014 ...And that is a perfect example of why I don't like Go. The Community...
- Bienlein (4/4) Mar 24 2014 I would appreciate being allowed to omit the trailing semicolon
- Steve Teale (4/9) Mar 30 2014 As an alternative, python could be modified to make it more D
Hi As a newcomer to D, I wonder, how difficult would be and would it be welcome by the D community to have D's syntax with significant whitespace and without brackets more like python? Thanks.
Mar 21 2014
On 03/21/2014 07:47 PM, Pedro Larroy wrote:Hi As a newcomer to D, I wonder, how difficult would be and would it be welcome by the D community to have D's syntax with significant whitespace and without brackets more like python? Thanks.http://delight.sourceforge.net/
Mar 21 2014
Pedro Larroy:As a newcomer to D, I wonder, how difficult would be and would it be welcome by the D community to have D's syntax with significant whitespace and without brackets more like python?You have to revive this project to port it to D2: http://delight.sourceforge.net/ Bye, bearophile
Mar 21 2014
On Friday, 21 March 2014 at 18:51:46 UTC, bearophile wrote:Pedro Larroy:It's already in progress: https://github.com/pplantinga/delight http://pplantinga.github.io/As a newcomer to D, I wonder, how difficult would be and would it be welcome by the D community to have D's syntax with significant whitespace and without brackets more like python?You have to revive this project to port it to D2: http://delight.sourceforge.net/ Bye, bearophile
Mar 21 2014
The Guest:It's already in progress: https://github.com/pplantinga/delight http://pplantinga.github.io/Some design decision are bad, like "less" for "<", or the function definition syntax "function add(int a, b -> int):". Bye, bearophile
Mar 21 2014
On Friday, 21 March 2014 at 20:52:54 UTC, bearophile wrote:The Guest:I agree with you. They should stick to PEP-3107 style "def add(a, b: int) -> int:".It's already in progress: https://github.com/pplantinga/delight http://pplantinga.github.io/Some design decision are bad, like "less" for "<", or the function definition syntax "function add(int a, b -> int):". Bye, bearophile
Mar 21 2014
On Friday, 21 March 2014 at 18:47:49 UTC, Pedro Larroy wrote:Hi As a newcomer to D, I wonder, how difficult would be and would it be welcome by the D community to have D's syntax with significant whitespace and without brackets more like python? Thanks.Why not just learn the correct syntax instead of perpetuating ignorance? Python syntax is not modern. COBOL just needs to go away...
Mar 21 2014
On Fri, 2014-03-21 at 18:55 +0000, Frustrated wrote: […]Why not just learn the correct syntax instead of perpetuating ignorance? Python syntax is not modern. COBOL just needs to go away...D syntax is of course less modern than that of Python: Python syntax is 1980s, D syntax is rooted in C syntax which is 1970s. It is an error to equate the quality of a programming language with the age of the base syntax: D and Python are both good programming languages, different agreed. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Mar 21 2014
On Friday, 21 March 2014 at 19:23:34 UTC, Russel Winder wrote:On Fri, 2014-03-21 at 18:55 +0000, Frustrated wrote: […]Um, ALGOL was created in the early 60's of which python's spacing scheme is based on. Just because python came out after C does not change that. Do you think it might have been possible that Ritchie learned the lessons of ALGOL of which Rossum spat in his face? Some people just never learn from history... "Python mandates a convention that programmers in ALGOL-style languages often follow." http://en.wikipedia.org/wiki/Python_syntax_and_semantics#IndentationWhy not just learn the correct syntax instead of perpetuating ignorance? Python syntax is not modern. COBOL just needs to go away...D syntax is of course less modern than that of Python: Python syntax is 1980s, D syntax is rooted in C syntax which is 1970s. It is an error to equate the quality of a programming language with the age of the base syntax: D and Python are both good programming languages, different agreed.
Mar 21 2014
On 03/22/2014 12:47 AM, Frustrated wrote:=D. http://en.wikipedia.org/wiki/ALGOL#Examples_and_portability_issuesD syntax is of course less modern than that of Python: Python syntax is 1980s, D syntax is rooted in C syntax which is 1970s. It is an error to equate the quality of a programming language with the age of the base syntax: D and Python are both good programming languages, different agreed.Um, ALGOL was created in the early 60's of which python's spacing scheme is based on.Just because python came out after C does not change that. Do you think it might have been possible that Ritchie learned the lessons of ALGOL of which Rossum spat in his face?No way.Some people just never learn from history... "Python mandates a convention that programmers in ALGOL-style languages often follow." http://en.wikipedia.org/wiki/Python_syntax_and_semantics#IndentationYup. ALGOL-style languages such as D.
Mar 21 2014
On Fri, 2014-03-21 at 23:47 +0000, Frustrated wrote: […]Um, ALGOL was created in the early 60's of which python's spacing scheme is based on. Just because python came out after C does not change that. Do you think it might have been possible that Ritchie learned the lessons of ALGOL of which Rossum spat in his face? Some people just never learn from history... "Python mandates a convention that programmers in ALGOL-style languages often follow." http://en.wikipedia.org/wiki/Python_syntax_and_semantics#IndentationALGOL60 had begin and end to delimit blocks, the indentation of the block was a visual thing to help readability, just as in C, C++, D. ALGOL60 did not have significant whitespace and an offside rule, just like C, C++ and D don't, whereas Python, OCaml, etc. do. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Mar 22 2014
On Saturday, 22 March 2014 at 13:03:06 UTC, Russel Winder wrote:ALGOL60 did not have significant whitespace and an offside rule, just like C, C++ and D don't, whereas Python, OCaml, etc. do.I've programmed in OCaml for many years and I somehow missed the significant whitespace. Even the Revised syntax for OCaml (the improved and unused one) did not use significant whitespace, though I recall that there were unloved projects to provide such a syntax. C++ has a much nastier syntax than D (IMO of course :-) but the SPECS proposal for a resyntaxed C++ never caught on. I liked some of the improvements suggested there, in particular the more Pascal-ish or Scala-ish declaration syntax, and would have liked something like that in D, but there are so many more issues to be fixed that daydreams of improved syntax seem frivolous to me.
Mar 22 2014
Am 22.03.2014 17:14, schrieb Brian Rogoff:On Saturday, 22 March 2014 at 13:03:06 UTC, Russel Winder wrote:significant whitespace mode that could be turned on with a compiler directive "#light on". The significant whitespace mode won and became the default, with the OCaml mode being the optional one. -- PauloALGOL60 did not have significant whitespace and an offside rule, just like C, C++ and D don't, whereas Python, OCaml, etc. do.I've programmed in OCaml for many years and I somehow missed the significant whitespace. Even the Revised syntax for OCaml (the improved and unused one) did not use significant whitespace, though I recall that there were unloved projects to provide such a syntax.
Mar 22 2014
On Saturday, 22 March 2014 at 16:28:11 UTC, Paulo Pinto wrote:a significant whitespace mode that could be turned on with a compiler directive "#light on". the default. The significant whitespace mode won and became the default, with the OCaml mode being the optional one.That's not too hard to believe. I like OCaml a lot but its syntax is not its best feature. The OCaml preprocessor (CamlP4) had an improved syntax called Revised as one of its applications. As I recall, Gerard Huet (who publicized 'the zipper') used a subset of Revised he called Pidgin ML in his publications. They looked a lot nicer than regular OCaml. never visit Windows. It looks like it has some interesting improvements over OCaml (let!, async stuff, LINQ, some overloading, ...) but has a weak module system compared to OCaml.
Mar 22 2014
Brian Rogoff:I like OCaml a lot but its syntax is not its best feature.See also: http://people.csail.mit.edu/mikelin/ocaml+twt/ Bye, bearophile
Mar 22 2014
On Sat, 2014-03-22 at 16:14 +0000, Brian Rogoff wrote:On Saturday, 22 March 2014 at 13:03:06 UTC, Russel Winder wrote:I appear to have typed OCaml when I meant Haskell, possibly because I am trying to build Unison. You are correct (obviously :-) OCaml does not does, I did not appreciate this, so that is definitely a WILT.ALGOL60 did not have significant whitespace and an offside rule, just like C, C++ and D don't, whereas Python, OCaml, etc. do.I've programmed in OCaml for many years and I somehow missed the significant whitespace. Even the Revised syntax for OCaml (the improved and unused one) did not use significant whitespace, though I recall that there were unloved projects to provide such a syntax.C++ has a much nastier syntax than D (IMO of course :-) but the SPECS proposal for a resyntaxed C++ never caught on. I liked some of the improvements suggested there, in particular the more Pascal-ish or Scala-ish declaration syntax, and would have liked something like that in D, but there are so many more issues to be fixed that daydreams of improved syntax seem frivolous to me.The Scala, Go, Rust, etc. use of "type after variable name" reads better for me, but C, C++, D, Java, Groovy, Ceylon are all "type before variable" (well the C++ rule is spiral out, but…), so I just get used to switching. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Mar 22 2014
On 3/22/14, 12:43, Russel Winder wrote:On Sat, 2014-03-22 at 16:14 +0000, Brian Rogoff wrote:I find I think of the type as an adjective, and since I'm only fluent in english it makes perfect sense that the "adjective" would come before the "noun". What is X? X is an integer. Integer describes what X is. "type after variable name" just doesn't have that mental model to it, hence I like it less.On Saturday, 22 March 2014 at 13:03:06 UTC, Russel Winder wrote:I appear to have typed OCaml when I meant Haskell, possibly because I am trying to build Unison. You are correct (obviously :-) OCaml does not does, I did not appreciate this, so that is definitely a WILT.ALGOL60 did not have significant whitespace and an offside rule, just like C, C++ and D don't, whereas Python, OCaml, etc. do.I've programmed in OCaml for many years and I somehow missed the significant whitespace. Even the Revised syntax for OCaml (the improved and unused one) did not use significant whitespace, though I recall that there were unloved projects to provide such a syntax.C++ has a much nastier syntax than D (IMO of course :-) but the SPECS proposal for a resyntaxed C++ never caught on. I liked some of the improvements suggested there, in particular the more Pascal-ish or Scala-ish declaration syntax, and would have liked something like that in D, but there are so many more issues to be fixed that daydreams of improved syntax seem frivolous to me.The Scala, Go, Rust, etc. use of "type after variable name" reads better for me, but C, C++, D, Java, Groovy, Ceylon are all "type before variable" (well the C++ rule is spiral out, but…), so I just get used to switching.
Mar 23 2014
On 03/23/2014 02:01 PM, 1100110 wrote:... I find I think of the type as an adjective,It's a noun.and since I'm only fluent in english it makes perfect sense that the "adjective" would come before the "noun". What is X? X is an integer. ...Exactly.
Mar 23 2014
On 3/23/14, 8:23, Timon Gehr wrote:On 03/23/2014 02:01 PM, 1100110 wrote:It's technically a metaphor =)... I find I think of the type as an adjective,It's a noun.and since I'm only fluent in english it makes perfect sense that the "adjective" would come before the "noun". What is X? X is an integer. ...Exactly.
Mar 23 2014
On 3/23/2014 9:01 AM, 1100110 wrote:I find I think of the type as an adjective, and since I'm only fluent in english it makes perfect sense that the "adjective" would come before the "noun". What is X? X is an integer. Integer describes what X is. "type after variable name" just doesn't have that mental model to it, hence I like it less.I like "type name;" order because I usually know the type I want (even if it's just "auto") before I know what I want to name the variable. So it's more natural for me to write. I've done plenty of "name : type;" code before, and I'm fine with it, but I usually end up either writing the type first and then moving back to write the name, or come up with a name first while making sure not to forget what type I'd already had in mind. So a little bit more awkward for me.
Mar 23 2014
On 03/22/14 11:14, Brian Rogoff wrote: [snip]C++ has a much nastier syntax than D (IMO of course :-) but the SPECS proposal for a resyntaxed C++ never caught on.Brian, could you provide a link for this proposal? I'd appreciate it. -regards, Larry
Mar 22 2014
On Saturday, 22 March 2014 at 18:08:01 UTC, evansl wrote:On 03/22/14 11:14, Brian Rogoff wrote: [snip]http://www.csse.monash.edu.au/~damian/papers/HTML/ModestProposal.html I think there is an expanded version of this report too, but this gives you the flavor. Note that it is based on a fairly old version of C++. I prefer the D !() for templates to their <[]>, but I prefer their declaration and pointer syntax. I don't think D's current syntax is really a problem. Well, there are some things that vex me a bit, like the multiple "alias this" and also the "is" syntax. Even though I prefer indentation sensitive syntax to C style syntax, if there were a front end for D that used an alternative syntax I would not use it. I suspect that I'm hardly unique in that either.C++ has a much nastier syntax than D (IMO of course :-) but the SPECS proposal for a resyntaxed C++ never caught on.Brian, could you provide a link for this proposal? I'd appreciate it. -regards, Larry
Mar 22 2014
On 21 March 2014 18:55, Frustrated <Frustrated nowhere.com> wrote:On Friday, 21 March 2014 at 18:47:49 UTC, Pedro Larroy wrote:http://www.coboloncogs.org/INDEX.HTMHi As a newcomer to D, I wonder, how difficult would be and would it be welcome by the D community to have D's syntax with significant whitespace and without brackets more like python? Thanks.Why not just learn the correct syntax instead of perpetuating ignorance? Python syntax is not modern. COBOL just needs to go away...
Mar 22 2014
On Friday, 21 March 2014 at 18:47:49 UTC, Pedro Larroy wrote:As a newcomer to D, I wonder, how difficult would be and would it be welcome by the D community to have D's syntax with significant whitespace and without brackets more like python?I don't think it would be really hard to do in the compiler, you could probably make it work by hacking up the lexer. But I'm totally against it, Python has hideous syntax.
Mar 21 2014
On Fri, 2014-03-21 at 19:13 +0000, Adam D. Ruppe wrote: […]But I'm totally against it, Python has hideous syntax.I would leave D syntax as it is. Python syntax is not hideous, it is good; very Pythonic, unlike D. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Mar 21 2014
On Friday, 21 March 2014 at 18:47:49 UTC, Pedro Larroy wrote:Hi As a newcomer to D, I wonder, how difficult would be and would it be welcome by the D community to have D's syntax with significant whitespace and without brackets more like python? Thanks.I don't think it's so difficult but it will increase a lot of code. Also, I don't believe the community will like something this. I'm not sure how accepted is python to most of this C/C++ guys. I personally don't like python/ruby/perl syntax.
Mar 21 2014
On Friday, 21 March 2014 at 18:47:49 UTC, Pedro Larroy wrote:Hi As a newcomer to D, I wonder, how difficult would be and would it be welcome by the D community to have D's syntax with significant whitespace and without brackets more like python? Thanks.What draws you to D, if not the syntax? If you're looking for a fast, Python-like language, and you don't mind dependence on the CPython runtime, I'd suggest looking into Cython (http://cython.org/). If you're interested in modern language features and expressive metaprogramming with a Python-like syntax, I'd recommend Julia (http://julialang.org/). You might also be interested in Dylan (https://opendylan.org/), though I don't know much about it.
Mar 21 2014
Am 21.03.2014 21:43, schrieb Mason McGill:On Friday, 21 March 2014 at 18:47:49 UTC, Pedro Larroy wrote:Dylan could have been a great language. A lisp for systems programming with algol syntax. Developed at Apple, originally targeted at the Newton. Since it was newly released as open source it has got some followers, but I am not sure if it will ever manage to get out of "could have been great" status. -- PauloHi As a newcomer to D, I wonder, how difficult would be and would it be welcome by the D community to have D's syntax with significant whitespace and without brackets more like python? Thanks.What draws you to D, if not the syntax? If you're looking for a fast, Python-like language, and you don't mind dependence on the CPython runtime, I'd suggest looking into Cython (http://cython.org/). If you're interested in modern language features and expressive metaprogramming with a Python-like syntax, I'd recommend Julia (http://julialang.org/). You might also be interested in Dylan (https://opendylan.org/), though I don't know much about it.
Mar 21 2014
On Friday, 21 March 2014 at 20:43:24 UTC, Mason McGill wrote:On Friday, 21 March 2014 at 18:47:49 UTC, Pedro Larroy wrote:Definitely not the syntax! The promise of a relatively high level statically typed language with low level control and C/C++ levels of performance. That's what I'm looking for with D. I choke down the syntax, telling myself "at least it's better than C++".Hi As a newcomer to D, I wonder, how difficult would be and would it be welcome by the D community to have D's syntax with significant whitespace and without brackets more like python? Thanks.What draws you to D, if not the syntax?If you're looking for a fast, Python-like language, and you don't mind dependence on the CPython runtime, I'd suggest looking into Cython (http://cython.org/). If you're interested in modern language features and expressive metaprogramming with a Python-like syntax, I'd recommend Julia (http://julialang.org/).You're wrong about Julia. The syntax is most reminiscent of MATLAB and Octave. Others are wrong comparing Ruby/Perl/whatever to Python, at least the syntax. I find Python syntax very readable, it's the type system and semantics of Python that I dislike. Closest language to D with a Pythonesque syntax is Nimrod, nimrod-lang.org It's author, Araq, sometimes reads this forum. I believe that Haskell is the most popular statically typed language with indentation sensitive syntax. But Haskell is a lazy functional language where programming with side effects is more difficult. That's not like D. I doubt there's much interest in a new syntax for D. You may as well find or create a different language if it bothers you. I empathize, but I'm certain you'd be better off just getting used to the existing D syntax.
Mar 21 2014
Whether or not white space is significant is a _very_ subjective matter. It's not a given that it's a universal improvement. D is a C language family member and that's not going to change, including it's treatment of whitespace and use of braces. On 3/21/14, 11:47 AM, Pedro Larroy wrote:Hi As a newcomer to D, I wonder, how difficult would be and would it be welcome by the D community to have D's syntax with significant whitespace and without brackets more like python? Thanks.
Mar 21 2014
A Python syntax wrapper around D is a fun thing. It's also suggested as a fun project to work in the D Programming Language book by Andrei. [1] If you're coming to D from Python though, I suppose my suggestion would to try and get used to the C-like syntax. If C-like syntax is unusual for you, you'll get used to it eventually. It is nice sometimes in D to be able to use braces to declare an arbitrary scope and so on, and the braces tie in pretty well with closure syntax. You'll get used to it. [1] http://books.google.co.uk/books?id=bn7GNq6fiIUC&pg=PT47&dq=d+programming+language+python&hl=en&sa=X&ei=Eq4sU-rREOOt7QaTzoCQBg&redir_esc=y#v=onepage&q=d%20programming%20language%20python&f=false
Mar 21 2014
On Friday, March 21, 2014 18:47:47 Pedro Larroy wrote:Hi As a newcomer to D, I wonder, how difficult would be and would it be welcome by the D community to have D's syntax with significant whitespace and without brackets more like python?*shudder* Python is more like the antithesis of good syntax IMHO. Sure, you could have a language with D's capabilities where the syntax had been adjusted to be more python-like, but I don't know what the benefit would be. Regardless, it's not like we're going to change D's syntax at this point. That would be king of breaking changes which wasn't worth what it cost. I expect that the closest you would get would be some project which essentially created its own language and simply converted it to D when compiling. - Jonathan M Davis
Mar 21 2014
On Fri, Mar 21, 2014 at 05:47:03PM -0400, Jonathan M Davis wrote:On Friday, March 21, 2014 18:47:47 Pedro Larroy wrote:[...] I'm disappointed about how many discussions revolve around superficial things such as syntax, while neglecting weightier matters such as semantics and expressiveness. T -- What doesn't kill me makes me stranger.Hi As a newcomer to D, I wonder, how difficult would be and would it be welcome by the D community to have D's syntax with significant whitespace and without brackets more like python?*shudder* Python is more like the antithesis of good syntax IMHO. Sure, you could have a language with D's capabilities where the syntax had been adjusted to be more python-like, but I don't know what the benefit would be. Regardless, it's not like we're going to change D's syntax at this point. That would be king of breaking changes which wasn't worth what it cost. I expect that the closest you would get would be some project which essentially created its own language and simply converted it to D when compiling.
Mar 21 2014
On Friday, 21 March 2014 at 21:52:47 UTC, H. S. Teoh wrote:I'm disappointed about how many discussions revolve around superficial things such as syntax, while neglecting weightier matters such as semantics and expressiveness. Thttp://www.haskell.org/haskellwiki/Wadler%27s_Law People love to debate syntax. Semantics are much more interesting and worth talking about.
Mar 21 2014
On 3/21/14, 5:18 PM, w0rp wrote:On Friday, 21 March 2014 at 21:52:47 UTC, H. S. Teoh wrote:Well, one issue that's happening is that every so often github pull requests that are simple but important (such as documentation) sit there without getting due review. The regular contributors are spending time looking into them, with takes away time from more important issues they could work on. A dozen people are doing the simple work and the complicated work, while the rest of the forum sits on the sidelines wringing hands about what to do about the future of D. AndreiI'm disappointed about how many discussions revolve around superficial things such as syntax, while neglecting weightier matters such as semantics and expressiveness. Thttp://www.haskell.org/haskellwiki/Wadler%27s_Law People love to debate syntax. Semantics are much more interesting and worth talking about.
Mar 21 2014
On Fri, Mar 21, 2014 at 06:47:28PM -0700, Andrei Alexandrescu wrote:On 3/21/14, 5:18 PM, w0rp wrote:[...] Perhaps we should be talking about how more people can make github contributions instead. ;-) T -- Why are you blatanly misspelling "blatant"? -- Branden RobinsonOn Friday, 21 March 2014 at 21:52:47 UTC, H. S. Teoh wrote:Well, one issue that's happening is that every so often github pull requests that are simple but important (such as documentation) sit there without getting due review. The regular contributors are spending time looking into them, with takes away time from more important issues they could work on. A dozen people are doing the simple work and the complicated work, while the rest of the forum sits on the sidelines wringing hands about what to do about the future of D.I'm disappointed about how many discussions revolve around superficial things such as syntax, while neglecting weightier matters such as semantics and expressiveness. Thttp://www.haskell.org/haskellwiki/Wadler%27s_Law People love to debate syntax. Semantics are much more interesting and worth talking about.
Mar 21 2014
On 3/21/2014 7:08 PM, H. S. Teoh wrote:Perhaps we should be talking about how more people can make github contributions instead. ;-)Anyone can create a bugzilla account and/or a github account and get started contributing. Nobody's permission is required.
Mar 22 2014
On Sat, Mar 22, 2014 at 10:48:44AM -0700, Walter Bright wrote:On 3/21/2014 7:08 PM, H. S. Teoh wrote:I know that. :) I was alluding to motivating more forumites to participate. T -- Без труда не выловишь и рыбку из пруда.Perhaps we should be talking about how more people can make github contributions instead. ;-)Anyone can create a bugzilla account and/or a github account and get started contributing. Nobody's permission is required.
Mar 22 2014
On Saturday, 22 March 2014 at 01:47:48 UTC, Andrei Alexandrescu wrote:On 3/21/14, 5:18 PM, w0rp wrote:A dozen people are doing the simple work and the complicated work, while the rest of the forum sits on the sidelines wringing hands about what to do about the future of D.Andrei, Is there a list of grunt jobs that need to be done? Steve
Mar 22 2014
On 3/22/14, 1:22 AM, Steve Teale wrote:On Saturday, 22 March 2014 at 01:47:48 UTC, Andrei Alexandrescu wrote:Maintaining a list would be as much overhead as fixing the items on it. Just pick from: https://github.com/D-Programming-Language/dlang.org/pulls https://github.com/D-Programming-Language/tools/pulls https://github.com/D-Programming-Language/installer/pulls https://github.com/D-Programming-Language/dconf.org/pulls https://github.com/D-Programming-Language/visuald/pulls https://github.com/D-Programming-Language/phobos/pulls https://github.com/D-Programming-Language/druntime/pulls https://github.com/D-Programming-Language/dmd/pulls AndreiOn 3/21/14, 5:18 PM, w0rp wrote:A dozen people are doing the simple work and the complicated work, while the rest of the forum sits on the sidelines wringing hands about what to do about the future of D.Andrei, Is there a list of grunt jobs that need to be done? Steve
Mar 22 2014
On 3/21/14, 20:47, Andrei Alexandrescu wrote:On 3/21/14, 5:18 PM, w0rp wrote:You really want me to contribute? Cause I will. And due to my lack of education on the matter I will get all up in your way. You want the community to help participate? Get a list of simple moderate and hard jobs that are relatively high priority, and update the list weekly. A "stickied" post on the announce forum would work. Cause if there's something simple I can do, I'll do it. I just don't know what I can do.On Friday, 21 March 2014 at 21:52:47 UTC, H. S. Teoh wrote:Well, one issue that's happening is that every so often github pull requests that are simple but important (such as documentation) sit there without getting due review. The regular contributors are spending time looking into them, with takes away time from more important issues they could work on. A dozen people are doing the simple work and the complicated work, while the rest of the forum sits on the sidelines wringing hands about what to do about the future of D. AndreiI'm disappointed about how many discussions revolve around superficial things such as syntax, while neglecting weightier matters such as semantics and expressiveness. Thttp://www.haskell.org/haskellwiki/Wadler%27s_Law People love to debate syntax. Semantics are much more interesting and worth talking about.
Mar 23 2014
Am Sun, 23 Mar 2014 08:09:03 -0500 schrieb 1100110 <0b1100110 gmail.com>:A "stickied" post on the announce forum would work.... stickied ... in a NNTP news group ... :) -- Marco
Mar 23 2014
On 3/23/14, 9:36, Marco Leise wrote:Am Sun, 23 Mar 2014 08:09:03 -0500 schrieb 1100110 <0b1100110 gmail.com>:Haha, I just meant bump it so that it stays active. There's a reason I used quotes! =PA "stickied" post on the announce forum would work..... stickied ... in a NNTP news group ... :)
Mar 23 2014
I don't know if significant whitespace is actually "improving" the syntax. "As a simple, self-contained example, consider the representation of program structure. Some observers objected to Go's C-like block structure with braces, preferring the use of spaces for indentation, in the style of Python or Haskell. However, we have had extensive experience tracking down build and test failures caused by cross-language builds where a Python snippet embedded in another language, for instance through a SWIG invocation, is subtly and invisibly broken by a change in the indentation of the surrounding code. Our position is therefore that, although spaces for indentation is nice for small programs, it doesn't scale well, and the bigger and more heterogeneous the code base, the more trouble it can cause. It is better to forgo convenience for safety and dependability, so Go has brace-bounded blocks. " Source: http://talks.golang.org/2012/splash.article -- Ziad
Mar 21 2014
On Friday, 21 March 2014 at 23:33:51 UTC, Ziad Hatahet wrote:I don't know if significant whitespace is actually "improving" the syntax. "As a simple, self-contained example, consider the representation of program structure. Some observers objected to Go's C-like block structure with braces, preferring the use of spaces for indentation, in the style of Python or Haskell. However, we have had extensive experience tracking down build and test failures caused by cross-language builds where a Python snippet embedded in another language, for instance through a SWIG invocation, is subtly and invisibly broken by a change in the indentation of the surrounding code. Our position is therefore that, although spaces for indentation is nice for small programs, it doesn't scale well, and the bigger and more heterogeneous the code base, the more trouble it can cause. It is better to forgo convenience for safety and dependability, so Go has brace-bounded blocks. " Source: http://talks.golang.org/2012/splash.article -- Ziad+1 This is exactly my experience. A lot of people use Python for quick prototyping which doesn't involve more than a few hundered lines of code. Fine. If, however, you have a medium-to-big project in Python it is just one big annoyance. Python's syntax is prescriptive in the sense that it prescribes how your code should look like on the page ("to help you write clean code"). Even trivial things like copy and paste cause problems in Python (not to mention the "tab against space war"). As usual, (over-)prescriptiveness causes more problems than it solves in the long run.
Mar 25 2014
On Friday, March 21, 2014 14:51:13 H. S. Teoh wrote:I'm disappointed about how many discussions revolve around superficial things such as syntax, while neglecting weightier matters such as semantics and expressiveness.I suspect that a lot of it just comes down to bikeshedding. Syntax is something that pretty much everyone can discuss, whereas semantics get a lot more complicated and require a much greater understanding. - Jonathan M Davis
Mar 21 2014
On 3/21/14, 11:47 AM, Pedro Larroy wrote:Hi As a newcomer to D, I wonder, how difficult would be and would it be welcome by the D community to have D's syntax with significant whitespace and without brackets more like python?Hey Pedro, I think some (including possibly myself) could enjoy a D dialect with Python indentation quite a bit. Given D's compilation speed, that can be achieved as a dialect without much aggravation by using a preprocessor. In fact I considered writing such a preprocessor as a running example through the chapters of TDPL, but didn't get around to it. Andrei
Mar 21 2014
On Fri, 2014-03-21 at 18:21 -0700, Andrei Alexandrescu wrote: […]I think some (including possibly myself) could enjoy a D dialect with Python indentation quite a bit. Given D's compilation speed, that can be achieved as a dialect without much aggravation by using a preprocessor. In fact I considered writing such a preprocessor as a running example through the chapters of TDPL, but didn't get around to it.I am not convinced. CoffeeScript as a JavaScript dialect hasn't really taken off, people just use JavaScript. Interestingly a similar thought is on a thread in the Go community: provide a nicer syntax to Go. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Mar 22 2014
On Saturday, 22 March 2014 at 12:36:17 UTC, Russel Winder wrote:I am not convinced. CoffeeScript as a JavaScript dialect hasn't really taken off, people just use JavaScript.Well, that depends on your definition of "taken off". If you were to do a GitHub search, you'd probably find a lot more projects using CoffeeScript than e.g. D. Also, CoffeeScript compiles to JavaScript, so it isn't even an either-or question in first place. David
Mar 22 2014
On Saturday, 22 March 2014 at 12:36:17 UTC, Russel Winder wrote:I am not convinced. CoffeeScript as a JavaScript dialect hasn't really taken off, people just use JavaScript.Well, I don't know, Dart is in the same vein as CoffeeScript. Dart is compiling to Javascript and Angular Dart is gaining quite a bit of interest even before being ready for production. AngularJS is already quite popular, and more messy than the Dart version. There is a clear upgrade path from JS->Dart. Dart VM will most likely be integrated in Chrome by the end of the year and that probably will have an effect on adoption rate. But, the Dart semantics are significantly better than ECMAScript/Javascript. Probably more so than CoffeeScript. cfront also used to compile to C, but the C++ semantics are more suitable for OO than C. So it supports a different workflow. (but cfront as I remember it was nowhere near great) So, in one aspect I agree, if the dialect is just syntax, then it has less chance of gaining momentum, but if it better supports a particular workflow/ type of modelling then it might succeed. I think a python-like syntax in combination with an interpreter like environment (in the vain of ipython) could be more suitable for a particular workflow than the c-like syntax. A strongly typed, terse and readable language with a good dev environment could be a real killer. Prototype in the REPL/interpreter and paste into your editor is an attractive development proposition.
Mar 22 2014
On Sat, 2014-03-22 at 15:10 +0000, Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= puremagic.com wrote: […]Well, I don't know, Dart is in the same vein as CoffeeScript. Dart is compiling to Javascript and Angular Dart is gaining quite a bit of interest even before being ready for production. AngularJS is already quite popular, and more messy than the Dart version. There is a clear upgrade path from JS->Dart. Dart VM will most likely be integrated in Chrome by the end of the year and that probably will have an effect on adoption rate. But, the Dart semantics are significantly better than ECMAScript/Javascript. Probably more so than CoffeeScript.[…] I am currently ambivalent about Dart. Node.js has shown that many people like "end to end" the same language. Many are asking about server-side Dart as well as client-side Dart in the browser. Another player in this game is Ceylon which has the explicit aim of being the "end to end" language compiling to JVM or JavaScript for server side and JavaScript for client side. I'm not sure how they play the HTML5 (AngularJS, Ember.js, Backbone.js, jQuery, etc) game. But I have stopped following all that recently for various reasons.I think a python-like syntax in combination with an interpreter like environment (in the vain of ipython) could be more suitable for a particular workflow than the c-like syntax. A strongly typed, terse and readable language with a good dev environment could be a real killer. Prototype in the REPL/interpreter and paste into your editor is an attractive development proposition.IPython is an excellent tool for creating documents that incorporate executable Python as an integral component. It is "literate Python programming". However it is only a good tool if the end result is a document to be read and shared. I think the Python IDE such as Wing IDE, PyCharm, actually do the REPL and editor model better. But as the saying goes YMMV. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Mar 22 2014
On Saturday, 22 March 2014 at 17:54:16 UTC, Russel Winder wrote:like "end to end" the same language. Many are asking about server-side Dart as well as client-side Dart in the browser.Yes, a CLI/server Dart VM exists that is suitable for a http server. The advantage of client/server code sharing is obvious when you write web-apps, but I am a bit weary of using dynamic languages on web servers since runtime errors can be nasty. I personally would like to see a Dart version with a much stricter type system, but I think the Dart library is just about right for web development and the language itself is pretty well rounded and pragmatic (but nothing spectacular).IPython is an excellent tool for creating documents that incorporate executable Python as an integral component. It is "literate Python programming". However it is only a good tool if the end result is a document to be read and shared.Hm, I use it for all kinds of small scale experiments/testing, which usually just involves getting those 1-4 lines of python code right (array transformations, regexps etc). I guess it depends on what you use Python for.I think the Python IDE such as Wing IDE, PyCharm, actually do the REPL and editor model better.They probably are, but my point was more that a REPL/interpreter friendly syntax is not the same as a write/compile friendly syntax. (I am currently using Eclipse with PyDev and am a bit reluctant to use even more IDEs, but I see that PyCharm has a new free edition that I probably should check out. Thanks for the tip!) Ola.
Mar 22 2014
On 3/22/2014 2:38 PM, "Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang gmail.com>" wrote:On Saturday, 22 March 2014 at 17:54:16 UTC, Russel Winder wrote:Using the same language on client/server is indeed quite nice, partly because of less mental context-switching, and also because of increased code sharing (which also makes it easier to move things between client vs server if you need to). Because of that, and an irritating need to support cheapo shared/PHP-hosting servers (which are NEVER run by companies who have the slightest comprehension of security), I'd been using Haxe pretty heavily for a good while. Haxe is a rather "ok" language, which is practically high praise coming from me - I'm typically very critical of languages. FWIW though, lately I've been swinging back over to the side of "I'd rather use the best language I can whenever possible, code duplication and other concerns over multiple languages be damnned." Life's too short to tolerate subpar tools.like "end to end" the same language. Many are asking about server-side Dart as well as client-side Dart in the browser.Yes, a CLI/server Dart VM exists that is suitable for a http server. The advantage of client/server code sharing is obvious when you write web-apps, but I am a bit weary of using dynamic languages on web servers since runtime errors can be nasty. I personally would like to see a Dart version with a much stricter type system, but I think the Dart library is just about right for web development and the language itself is pretty well rounded and pragmatic (but nothing spectacular).
Mar 24 2014
On Monday, 24 March 2014 at 22:23:50 UTC, Nick Sabalausky wrote:Using the same language on client/server is indeed quite nice, partly because of less mental context-switching, and also because of increased code sharing (which also makes it easier to move things between client vs server if you need to).Yes, especially for data models. It is always annoying to modify several different layers just to add some fields to a database entry. Not a big deal, but so… pointless.using Haxe pretty heavily for a good while. Haxe is a rather "ok" language, which is practically high praise coming from me - I'm typically very critical of languages.I've looked at Haxe from time to time, and I like the approach, but it has never been sufficient to solve any issues in any real code I've worked on.FWIW though, lately I've been swinging back over to the side of "I'd rather use the best language I can whenever possible, code duplication and other concerns over multiple languages be damnned." Life's too short to tolerate subpar tools.Yeah, that's where I am at now too. So currently I deal with Python, Dart (working hard to get rid of Javascript) and C++ (and dabble with XSLT, Java and Objective-C). But I'd rather use something more clean and strongly typed like Go and D, but with Pythonesque terseness and functional style list processing hight level cleaness. Unfortunately both D and Go lack production level support. And even with production level support they still lack production quality libraries for excel handling, pdf generation etc.
Mar 24 2014
On 3/24/2014 6:49 PM, "Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang gmail.com>" wrote:On Monday, 24 March 2014 at 22:23:50 UTC, Nick Sabalausky wrote:Yea, common data models was a very big use of shared server/client code for me, too.Using the same language on client/server is indeed quite nice, partly because of less mental context-switching, and also because of increased code sharing (which also makes it easier to move things between client vs server if you need to).Yes, especially for data models. It is always annoying to modify several different layers just to add some fields to a database entry. Not a big deal, but so… pointless.For me, the killer features were: - As mentioned already, shared server/client code. - Being able to run code on any commodity PHP servers I was required to support, without having to actually *write* any PHP. - (Note this was several years ago:) Being able to generate Flash applets without having to actually use any of Adobe's horrible toolchain. - The language itself *didn't* totally piss me off. ;) So yea, the Haxe language itself wasn't really a key thing for me, just what it allowed me to *avoid* doing. But even those reasons are loosing their bite for me now, since Flash has pretty much become legacy, vibe.d has appeared, and I'd just as soon avoid the entire PHP runtime as a whole.using Haxe pretty heavily for a good while. Haxe is a rather "ok" language, which is practically high praise coming from me - I'm typically very critical of languages.I've looked at Haxe from time to time, and I like the approach, but it has never been sufficient to solve any issues in any real code I've worked on.Yeah, that's where I am at now too. So currently I deal with Python, Dart (working hard to get rid of Javascript) and C++ (and dabble with XSLT, Java and Objective-C). But I'd rather use something more clean and strongly typed like Go and D, but with Pythonesque terseness and functional style list processing hight level cleaness. Unfortunately both D and Go lack production level support. And even with production level support they still lack production quality libraries for excel handling, pdf generation etc.Heh, I guess that's where we differ ;) I'm...not exactly a big Python fan, and I find D totally production-ready. I generally avoid client-side JS - when I do use it, it's just a sprinkling. If I need to do anything else Flash-like in the future, I'm looking more at Unity3D (esp. the v5 on the horizon with asm.js support) rather than doing HTML5 directly or via things like Dart or CoffeScript.
Mar 25 2014
On Tuesday, 25 March 2014 at 10:28:51 UTC, Nick Sabalausky wrote:On 3/24/2014 6:49 PM, "Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang gmail.com>" wrote:In semi related news, have you guys seen Cmsed? Built into the data model registration is generation of javascript models which tie into the restful routing to give you (if I finished it) the same level of interaction with the database as you would in D. And yes you're in control of the security of each data model for each operation type. I just think thats a neat little feature.On Monday, 24 March 2014 at 22:23:50 UTC, Nick Sabalausky wrote:Yea, common data models was a very big use of shared server/client code for me, too.Using the same language on client/server is indeed quite nice, partly because of less mental context-switching, and also because of increased code sharing (which also makes it easier to move things between client vs server if you need to).Yes, especially for data models. It is always annoying to modify several different layers just to add some fields to a database entry. Not a big deal, but so… pointless.For me, the killer features were: - As mentioned already, shared server/client code. - Being able to run code on any commodity PHP servers I was required to support, without having to actually *write* any PHP. - (Note this was several years ago:) Being able to generate Flash applets without having to actually use any of Adobe's horrible toolchain. - The language itself *didn't* totally piss me off. ;) So yea, the Haxe language itself wasn't really a key thing for me, just what it allowed me to *avoid* doing. But even those reasons are loosing their bite for me now, since Flash has pretty much become legacy, vibe.d has appeared, and I'd just as soon avoid the entire PHP runtime as a whole.using Haxe pretty heavily for a good while. Haxe is a rather "ok" language, which is practically high praise coming from me - I'm typically very critical of languages.I've looked at Haxe from time to time, and I like the approach, but it has never been sufficient to solve any issues in any real code I've worked on.Yeah, that's where I am at now too. So currently I deal with Python, Dart (working hard to get rid of Javascript) and C++ (and dabble with XSLT, Java and Objective-C). But I'd rather use something more clean and strongly typed like Go and D, but with Pythonesque terseness and functional style list processing hight level cleaness. Unfortunately both D and Go lack production level support. And even with production level support they still lack production quality libraries for excel handling, pdf generation etc.Heh, I guess that's where we differ ;) I'm...not exactly a big Python fan, and I find D totally production-ready. I generally avoid client-side JS - when I do use it, it's just a sprinkling. If I need to do anything else Flash-like in the future, I'm looking more at Unity3D (esp. the v5 on the horizon with asm.js support) rather than doing HTML5 directly or via things like Dart or CoffeScript.
Mar 25 2014
On Tuesday, 25 March 2014 at 10:28:51 UTC, Nick Sabalausky wrote:So yea, the Haxe language itself wasn't really a key thing for me, just what it allowed me to *avoid* doing. But even those reasons are loosing their bite for me now, since Flash has pretty much become legacy, vibe.d has appeared, and I'd just as soon avoid the entire PHP runtime as a whole.I like the basic idea of Haxe since it in theory would allow programming cross platform on mobile units, but Apple, Google and Microsoft have made moves to make cross platform programming more difficult by deliberately being different for the sake of being different...Heh, I guess that's where we differ ;) I'm...not exactly a big Python fan, and I find D totally production-ready.Well, I wasn't a Python fan until I started using it, and still don't like the dynamic aspects of it, but the language/library support is better than the alternatives. The syntax does not prevent Python from scaling with a decent IDE, the lack of compile time type safety does. However it is nice to replace perl, bash, php etc with one cross platform language. Python manage to cover a lot of ground. That said I consider using D for a Windows tool (reading CVS files and uploading the result to a web server as a "cron" job). If I can do full static linking and just install a single binary then I can get simple "unbreakable" installs on client computers.
Mar 29 2014
On Saturday, 22 March 2014 at 01:22:14 UTC, Andrei Alexandrescu wrote:...Given D's compilation speed, that can be achieved as a dialect without much aggravation by using a preprocessor. In fact I considered writing such a preprocessor as a running example...Please someone could show a little example of the quote above? I mean it would act like C preprocessor or in D it has another meaning? Thanks, Matheus.
Mar 22 2014
On Saturday, 22 March 2014 at 16:19:44 UTC, MattCoder wrote:Please someone could show a little example of the quote above? I mean it would act like C preprocessor or in D it has another meaning?You would write a little program that sees changes of indentation and puts the braces in. So foo bar baz whatever It would see that bar and baz are indented together and put {} around it, making: foo { bar baz } whatever or something like that, which can then be fed into the D compiler normally.
Mar 22 2014
On 3/22/14, 9:19 AM, MattCoder wrote:On Saturday, 22 March 2014 at 01:22:14 UTC, Andrei Alexandrescu wrote:As simple as it gets. The program would translate files with extension ".wsd" into files with extension ".d" and run dmd (or rdmd) transparently. Appropriate handling of file timestamps etc. would complete a nice utility. You'd use it like wsd myscript.wsd which under the hood would create (if necessary) myscript.d and then exec rdmd on it. Andrei...Given D's compilation speed, that can be achieved as a dialect without much aggravation by using a preprocessor. In fact I considered writing such a preprocessor as a running example...Please someone could show a little example of the quote above? I mean it would act like C preprocessor or in D it has another meaning?
Mar 22 2014
On Saturday, 22 March 2014 at 17:28:16 UTC, Andrei Alexandrescu wrote:On 3/22/14, 9:19 AM, MattCoder wrote:After far too many hours on a plane today, I ended up building this[1]. This is very much a proof of concept, and not production ready in the slightest. I should point out that the extensibility and maintainability of this is roughly equivalent to that of a potato, but it serves its purpose decently well. [1] https://github.com/ColdenCullen/wsdOn Saturday, 22 March 2014 at 01:22:14 UTC, Andrei Alexandrescu wrote:As simple as it gets. The program would translate files with extension ".wsd" into files with extension ".d" and run dmd (or rdmd) transparently. Appropriate handling of file timestamps etc. would complete a nice utility. You'd use it like wsd myscript.wsd which under the hood would create (if necessary) myscript.d and then exec rdmd on it. Andrei...Given D's compilation speed, that can be achieved as a dialect without much aggravation by using a preprocessor. In fact I considered writing such a preprocessor as a running example...Please someone could show a little example of the quote above? I mean it would act like C preprocessor or in D it has another meaning?
Mar 22 2014
Colden Cullen:[1] https://github.com/ColdenCullen/wsdLooks like a good start. I could even use that syntax in some cases :-) (like some script-like programs). Using just an indent to define a sub-block seems a little too much brittle. So perhaps a specific keyword or symbol could be be used. In Python there is also the keyword "pass" that could be useful here. It could also be useful some way to switch back to normal D syntax inside a file, to solve some problem (like to simplify mixins creation). Bye, bearophile
Mar 22 2014
On Saturday, 22 March 2014 at 17:28:16 UTC, Andrei Alexandrescu wrote:As simple as it gets. The program would translate files with extension ".wsd" into files with extension ".d" and run dmd (or rdmd) transparently. Appropriate handling of file timestamps etc. would complete a nice utility. You'd use it like wsd myscript.wsd which under the hood would create (if necessary) myscript.d and then exec rdmd on it. AndreiTurns out this already exists: http://pplantinga.github.io/archives/delight-programming-language.html
Mar 28 2014
On Friday, 21 March 2014 at 18:47:49 UTC, Pedro Larroy wrote:Hi As a newcomer to D, I wonder, how difficult would be and would it be welcome by the D community to have D's syntax with significant whitespace and without brackets more like python? Thanks.It's interesting to see this being discussed, as somebody recently created a Go-like language with Pythonic syntax that compiles to Go. The Go community however didn't appear to be particularly interested in it: https://groups.google.com/forum/#!topic/golang-nuts/-STRYo2Cc0g
Mar 22 2014
On 3/22/14, 23:33, logicchains wrote:On Friday, 21 March 2014 at 18:47:49 UTC, Pedro Larroy wrote:...And that is a perfect example of why I don't like Go. The Community seems overly hostile.Hi As a newcomer to D, I wonder, how difficult would be and would it be welcome by the D community to have D's syntax with significant whitespace and without brackets more like python? Thanks.It's interesting to see this being discussed, as somebody recently created a Go-like language with Pythonic syntax that compiles to Go. The Go community however didn't appear to be particularly interested in it: https://groups.google.com/forum/#!topic/golang-nuts/-STRYo2Cc0g
Mar 23 2014
I would appreciate being allowed to omit the trailing semicolon as in Scala, Go, Kotlin and some other newer languages. Not terribly important, but in most cases the end-of-line character is simply redundant.
Mar 24 2014
On Friday, 21 March 2014 at 18:47:49 UTC, Pedro Larroy wrote:Hi As a newcomer to D, I wonder, how difficult would be and would it be welcome by the D community to have D's syntax with significant whitespace and without brackets more like python? Thanks.As an alternative, python could be modified to make it more D like. Steve
Mar 30 2014