I'm pretty sure it was mentioned before in this thread that some other more serious than JavaScript languages adopted this convenience, and I do remember Rust and Haskell amongst them.
On 27 July 2018 00:47:22 GMT+10:00, Yevhenii Kurtov <yevhenii.kur...@gmail.com> wrote: >Yeah, but what's the benefit of SHORTHAND syntax? There are no atoms in >JS >and thus we have additional bumps on our way to adopting that sugar. >I want to remind that whole store of JS is about adding syntax sugar >because language is a mess. All major js libraries prototype, sugar.js, >jquery, lodash and others were solving a problem that doesn't exists >in >Elixir. >Do we really need this in the core RIGHT NOW? > > >On Thu, Jul 26, 2018, 09:55 Amos King <a...@binarynoggin.com> wrote: > >> An officially blessed syntax gets a different level of support and >> understanding across the entire community. It also keeps new people >coming >> onto projects knowing the syntax and not needing to learn something >new >> because it is a hex package instead of being standard. >> >> Amos King >> Owner >> Binary Noggin >> http://binarynoggin.com #business >> http://thisagilelife.com #podcast >> >> ======================================================= >> I welcome VSRE emails. Learn more at http://vsre.info/ >> ======================================================= >> >> >> On Wed, Jul 25, 2018 at 9:52 PM, Yevhenii Kurtov < >> yevhenii.kur...@gmail.com> wrote: >> >>> What's especially beneficial in having it as a part of the core? >>> >>> On Thursday, July 26, 2018 at 5:04:40 AM UTC+7, Amos King wrote: >>>> >>>> I like the idea of the shorthand syntax as a built-in feature. >>>> >>>> The reading of the code could be slightly more confusing if the >syntax >>>> is available for maps. I don't think it would be any more confusing >than >>>> the current language. A sigil can use any brace so it could still >be as >>>> unclear as %, i.e., %{name, age} vs. ~m{name, age}. I also >frequently >>>> end up leaving the % off on maps and messing that up with tuples, >but I >>>> don't think that any of the solutions would make that situation any >>>> different. >>>> >>>> The feature would be great on maps and structs, but I would be >almost as >>>> excited about only having the short syntax available for structs. >That is >>>> an excellent place to start anyway. >>>> >>>> Amos King >>>> Owner >>>> Binary Noggin >>>> http://binarynoggin.com #business >>>> http://thisagilelife.com #podcast >>>> >>>> ======================================================= >>>> I welcome VSRE emails. Learn more at http://vsre.info/ >>>> ======================================================= >>>> >>>> >>>> On Wed, Jul 25, 2018 at 8:43 AM, Yevhenii Kurtov ><yevheni...@gmail.com> >>>> wrote: >>>> >>>>> I do agree about tuple concern and explicitness. After working a >long >>>>> hours it's great to have a little extra safety plus all editors >have >>>>> autocomplete and which also help to save few keystrokes. >>>>> >>>>> Also Shorthand approach is really good - it's immediately >possible to >>>>> see that a function is being called and thus transformation is >more obvious >>>>> rather than a little more magic in the core. >>>>> >>>>> Cheers. >>>>> >>>>> On Mon, Jul 16, 2018 at 2:20 AM 'Justin Wood' via elixir-lang-core >< >>>>> elixir-l...@googlegroups.com> wrote: >>>>> >>>>>> Just an example of a possible solution: we could introduce the >>>>>> shortcut syntax only for structs. Structs cannot be confused with >tuples >>>>>> because of the struct name. Structs keys are always atoms, so >there is no >>>>>> ambiguity with strings. >>>>>> >>>>>> >>>>>> I would acutally like if this was done for only structs (and >maybe >>>>>> something for records as well, but that is another topic). I >think it >>>>>> follows more closely to the three languages that I mentioned >earlier in the >>>>>> thread (using it on defined types). I feel like if this were also >done for >>>>>> maps, there would be a loss in explicitness. >>>>>> >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the >Google >>>>>> Groups "elixir-lang-core" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >send >>>>>> an email to elixir-lang-co...@googlegroups.com. >>>>>> To view this discussion on the web visit >>>>>> >https://groups.google.com/d/msgid/elixir-lang-core/CgIxXdMUkx7LSD4AzBE_KZDElKV8B_fu45NFSdbRbW_c-hF-DkRZPHFRvidoE9FMwhTcmCgvPuyUMJDjF399n20oAwl6xRETkx_MO87NHzs%3D%40protonmail.com >>>>>> ><https://groups.google.com/d/msgid/elixir-lang-core/CgIxXdMUkx7LSD4AzBE_KZDElKV8B_fu45NFSdbRbW_c-hF-DkRZPHFRvidoE9FMwhTcmCgvPuyUMJDjF399n20oAwl6xRETkx_MO87NHzs%3D%40protonmail.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "elixir-lang-core" group. >>>>> To unsubscribe from this group and stop receiving emails from it, >send >>>>> an email to elixir-lang-co...@googlegroups.com. >>>>> To view this discussion on the web visit >>>>> >https://groups.google.com/d/msgid/elixir-lang-core/CAJhrTGw29%3D68m93JT47A0wrLugTC6Xppj428XfETr3j0iaUApQ%40mail.gmail.com >>>>> ><https://groups.google.com/d/msgid/elixir-lang-core/CAJhrTGw29%3D68m93JT47A0wrLugTC6Xppj428XfETr3j0iaUApQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> -- >>> You received this message because you are subscribed to the Google >Groups >>> "elixir-lang-core" group. >>> To unsubscribe from this group and stop receiving emails from it, >send an >>> email to elixir-lang-core+unsubscr...@googlegroups.com. >>> To view this discussion on the web visit >>> >https://groups.google.com/d/msgid/elixir-lang-core/22d888f8-0d32-4749-a80e-8714ef3bb0ea%40googlegroups.com >>> ><https://groups.google.com/d/msgid/elixir-lang-core/22d888f8-0d32-4749-a80e-8714ef3bb0ea%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- >> You received this message because you are subscribed to the Google >Groups >> "elixir-lang-core" group. >> To unsubscribe from this group and stop receiving emails from it, >send an >> email to elixir-lang-core+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> >https://groups.google.com/d/msgid/elixir-lang-core/CAJr6D4QF5W5Hfj%3D7MYxgMME9MLEqcscz8Aw3VLsgRDkhoK8SyA%40mail.gmail.com >> ><https://groups.google.com/d/msgid/elixir-lang-core/CAJr6D4QF5W5Hfj%3D7MYxgMME9MLEqcscz8Aw3VLsgRDkhoK8SyA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > >-- >You received this message because you are subscribed to the Google >Groups "elixir-lang-core" group. >To unsubscribe from this group and stop receiving emails from it, send >an email to elixir-lang-core+unsubscr...@googlegroups.com. >To view this discussion on the web visit >https://groups.google.com/d/msgid/elixir-lang-core/CAJhrTGxnEk%3DXvLwqnVkMwd%3DJohg7txN8UfSASHSey6%2BWhRbp4g%40mail.gmail.com. >For more options, visit https://groups.google.com/d/optout. -- Kind regards, Dmitry Belyaev -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/D8868870-33FF-4ABF-B0B1-E19873F4CEA2%40gmail.com. For more options, visit https://groups.google.com/d/optout.