digitalmars.D - Alternative /hipster/ syntaxes for D
- ezdiy (26/26) Mar 29 2012 Hello,
- simendsjo (2/28) Mar 29 2012 http://delight.sourceforge.net/
- ezdiy (2/39) Mar 29 2012 dang, i fail at google once again. thanks!
- deadalnix (8/15) Mar 29 2012 This isn't a problem. Compare how successful
- ezdiy (7/32) Mar 29 2012 I'm not here to start flame about old vs new, use irc for that :)
- Iain Buclaw (10/39) Mar 29 2012 t
- deadalnix (2/36) Mar 29 2012 And that isn't really « new ».
- Iain Buclaw (9/58) Mar 29 2012 r
Hello, D syntax being C-ish one is great for oldschool class of quite conscise one compared to, eg. javas, it's still much on the overly verbose side for some people (ie. at least for me :) The question is, how one would go around to successfully implement an alternative modern syntax to "fix" this. Are there some attempts out there? I'm talking among the lines of translators for popular languages such as Lua (http://moonscript.org/) or Javascript (http://coffeescript.org/). For statically typed example, take a look at http://live.gnome.org/Genie for Vala. My idea is something like: try to keep as much of original D grammar as possible, but add a lot of syntactic sugar, f.e.: - strip perceived "bloat" - by default, all variables auto, only basics of OO (everything virtual and public..) exposed etc... - python's indentation blocks, instead of {} - line decorators, such as: a = b if c - multiple return values (either hack the compiler to have em, or add *a lot* of boilerplate to the translator to use tuples) - your ideas? Another issue is how to go around implementation. My bet is to start with some already existing 1:1 D translator which has an actual AST state (is there something like that?) and then try to retrofit it with as much of the hipster stuff until things start to get overly ambiguous :)
Mar 29 2012
On Thu, 29 Mar 2012 11:47:54 +0200, ezdiy <eezdiy gmail.com> wrote:Hello, D syntax being C-ish one is great for oldschool class of programmers compared to, eg. javas, it's still much on the overly verbose side for some people (ie. at least for me :) The question is, how one would go around to successfully implement an alternative modern syntax to "fix" this. Are there some attempts out there? I'm talking among the lines of translators for popular languages such as Lua (http://moonscript.org/) or Javascript (http://coffeescript.org/). For statically typed example, take a look at http://live.gnome.org/Genie for Vala. My idea is something like: try to keep as much of original D grammar as possible, but add a lot of syntactic sugar, f.e.: - strip perceived "bloat" - by default, all variables auto, only basics of OO (everything virtual and public..) exposed etc... - python's indentation blocks, instead of {} - line decorators, such as: a = b if c - multiple return values (either hack the compiler to have em, or add *a lot* of boilerplate to the translator to use tuples) - your ideas? Another issue is how to go around implementation. My bet is to start with some already existing 1:1 D translator which has an actual AST state (is there something like that?) and then try to retrofit it with as much of the hipster stuff until things start to get overly ambiguous :)http://delight.sourceforge.net/
Mar 29 2012
On Thursday, 29 March 2012 at 10:06:20 UTC, simendsjo wrote:On Thu, 29 Mar 2012 11:47:54 +0200, ezdiy <eezdiy gmail.com> wrote:dang, i fail at google once again. thanks!Hello, D syntax being C-ish one is great for oldschool class of it's quite conscise one compared to, eg. javas, it's still much on the overly verbose side for some people (ie. at least for me :) The question is, how one would go around to successfully implement an alternative modern syntax to "fix" this. Are there some attempts out there? I'm talking among the lines of translators for popular languages such as Lua (http://moonscript.org/) or Javascript (http://coffeescript.org/). For statically typed example, take a look at http://live.gnome.org/Genie for Vala. My idea is something like: try to keep as much of original D grammar as possible, but add a lot of syntactic sugar, f.e.: - strip perceived "bloat" - by default, all variables auto, only basics of OO (everything virtual and public..) exposed etc... - python's indentation blocks, instead of {} - line decorators, such as: a = b if c - multiple return values (either hack the compiler to have em, or add *a lot* of boilerplate to the translator to use tuples) - your ideas? Another issue is how to go around implementation. My bet is to start with some already existing 1:1 D translator which has an actual AST state (is there something like that?) and then try to retrofit it with as much of the hipster stuff until things start to get overly ambiguous :)http://delight.sourceforge.net/
Mar 29 2012
Le 29/03/2012 11:47, ezdiy a écrit :Hello, D syntax being C-ish one is great for oldschool class of programmers compared to, eg. javas, it's still much on the overly verbose side for some people (ie. at least for me :) The question is, how one would go around to successfully implement an alternative modern syntax to "fix" this. Are there some attempts out there?This isn't a problem. Compare how successful languages with « quite concise » syntax. This is a no match. This style has proven to be readable, convenient and many programmers are used to it. If you want to change that, you don't only need to prove that another syntax is better, but also that it is THAT MUCH BETTER that changing what everybody is used worth it. This sounds difficult to me.
Mar 29 2012
On Thursday, 29 March 2012 at 10:49:45 UTC, deadalnix wrote:Le 29/03/2012 11:47, ezdiy a écrit :I'm not here to start flame about old vs new, use irc for that :) Speaking to the point: Delight seems as a nice concept, however it's awfully implemented (hack of 3years outdated gdc). Such hacks *must* be implemented as code translators for reasons you've cited. Ie i can just generate code for people who refuse to learn something new.Hello, D syntax being C-ish one is great for oldschool class of programmers conscise one compared to, eg. javas, it's still much on the overly verbose side for some people (ie. at least for me :) The question is, how one would go around to successfully implement an alternative modern syntax to "fix" this. Are there some attempts out there?This isn't a problem. Compare how successful compared to languages with « quite concise » syntax. This is a no match. This style has proven to be readable, convenient and many programmers are used to it. If you want to change that, you don't only need to prove that another syntax is better, but also that it is THAT MUCH BETTER that changing what everybody is used worth it. This sounds difficult to me.
Mar 29 2012
On 29 March 2012 11:57, ezdiy <eezdiy gmail.com> wrote:On Thursday, 29 March 2012 at 10:49:45 UTC, deadalnix wrote:eLe 29/03/2012 11:47, ezdiy a =E9crit :Hello, D syntax being C-ish one is great for oldschool class of programmers compared to, eg. javas, it's still much on the overly verbose side for some people (ie. at least for me :) The question is, how one would go around to successfully implement an alternative modern syntax to "fix" this. Are there some attempts out there?This isn't a problem. Compare how successful languages with =AB quite concise =BB syntax. This is a no match. This style has proven to be readable, convenient and many programmers ar=tused to it. If you want to change that, you don't only need to prove tha=ginganother syntax is better, but also that it is THAT MUCH BETTER that chan=llywhat everybody is used worth it. This sounds difficult to me.I'm not here to start flame about old vs new, use irc for that :) Speaking to the point: Delight seems as a nice concept, however it's awfu=implemented (hack of 3years outdated gdc). Such hacks *must* be implement=edas code translators for reasons you've cited. Ie i can just generate code for people who refuse to learn something new.Sounds like literate programming to me. --=20 Iain Buclaw *(p < e ? p++ : p) =3D (c & 0x0f) + '0';
Mar 29 2012
Le 29/03/2012 13:22, Iain Buclaw a écrit :On 29 March 2012 11:57, ezdiy<eezdiy gmail.com> wrote:And that isn't really « new ».On Thursday, 29 March 2012 at 10:49:45 UTC, deadalnix wrote:Sounds like literate programming to me.Le 29/03/2012 11:47, ezdiy a écrit :I'm not here to start flame about old vs new, use irc for that :) Speaking to the point: Delight seems as a nice concept, however it's awfully implemented (hack of 3years outdated gdc). Such hacks *must* be implemented as code translators for reasons you've cited. Ie i can just generate code for people who refuse to learn something new.Hello, D syntax being C-ish one is great for oldschool class of programmers compared to, eg. javas, it's still much on the overly verbose side for some people (ie. at least for me :) The question is, how one would go around to successfully implement an alternative modern syntax to "fix" this. Are there some attempts out there?This isn't a problem. Compare how successful languages with « quite concise » syntax. This is a no match. This style has proven to be readable, convenient and many programmers are used to it. If you want to change that, you don't only need to prove that another syntax is better, but also that it is THAT MUCH BETTER that changing what everybody is used worth it. This sounds difficult to me.
Mar 29 2012
On 29 March 2012 14:21, deadalnix <deadalnix gmail.com> wrote:Le 29/03/2012 13:22, Iain Buclaw a =E9crit :eOn 29 March 2012 11:57, ezdiy<eezdiy gmail.com> =A0wrote:On Thursday, 29 March 2012 at 10:49:45 UTC, deadalnix wrote:Le 29/03/2012 11:47, ezdiy a =E9crit :Hello, D syntax being C-ish one is great for oldschool class of programmersrcompared to, eg. javas, it's still much on the overly verbose side fo=tosome people (ie. at least for me :) The question is, how one would go around to successfully implement an alternative modern syntax to "fix" this. Are there some attempts out there?This isn't a problem. Compare how successfuldelanguages with =AB quite concise =BB syntax. This is a no match. This style has proven to be readable, convenient and many programmers are used to it. If you want to change that, you don't only need to prove that another syntax is better, but also that it is THAT MUCH BETTER that changing what everybody is used worth it. This sounds difficult to me.I'm not here to start flame about old vs new, use irc for that :) Speaking to the point: Delight seems as a nice concept, however it's awfully implemented (hack of 3years outdated gdc). Such hacks *must* be implemented as code translators for reasons you've cited. Ie i can just generate co=Or very successful... however, success is in the eye of the beholder. :~) --=20 Iain Buclaw *(p < e ? p++ : p) =3D (c & 0x0f) + '0';And that isn't really =AB new =BB.for people who refuse to learn something new.Sounds like literate programming to me.
Mar 29 2012