4 ms·
> every declarative language becomes a programming language. Overly pessimistic, lots of non-programming languages remain non-programming languages. Just becau
by embedding-shape 11mo ago
> every declarative language becomes a programming language.
Overly pessimistic, lots of non-programming languages remain non-programming languages. Just because one of the most widely used declarative languages start adding conditionals doesn't mean the whole world is turning upside down...
> The distinction between code, config and data is being erased.
As as lisp programmer, I love it. Get rid of treating things differently, make everything the same and make everything work with everything, code should just be data.
- zkmon 11mo ago>> Just because one of the most widely used declarative languages start adding conditionals doesn't mean the whole world is turning upside down. You need to look at a large terraform project.
- embedding-shape 11mo agoI spent more time than I'm willing to on large Terraform projects. How exactly is this relevant to declarative vs imperative or even my comment at all? I don't see what the "gotcha" is supposed to be here.
- bmn__ 11mo ago> > The distinction between code, config and data is being erased. > As as lisp programmer, I love it. You make bad engineering decisions because you consider the advantages, but not the disadvantages. <https://news.ycombinator.com/item?id=29231493 https://news.ycombinator.com/item?id=29231493>
- embedding-shape 11mo agoYou make bad comments because I can't understand the point you're trying to make. I'm am engineer, I make choices based on informed tradeoffs, anything else would be sub-standard. Not sure why you think I only consider advantages, but I'm afraid asking you for clarification will just lead to more ramblings.
- bmn__ 11mo agoThe disadvantages are in the post I linked to.
- embedding-shape 11mo agoAlright, I guess I'll reply to that with another comment you can go and read then: https://news.ycombinator.com/item?id=38373081 https://news.ycombinator.com/item?id=38373081 Fun way of having a conversation.
- shevy-java 11mo ago> Just because one of the most widely used declarative languages start adding conditionals doesn't mean the whole world is turning upside down. The question still is: why is CSS becoming a programming language? And who decides on this, anyway?
- tr45872267 11mo agoBecause modern UI toolkits like Flutter proved that UI should just be code, not separated into three different languages. In this case, adding conditionals can remove the need for js in some cases, which is good.
- ffsm8 11mo agoConsidering how this is seems to be designed... I don't think that's the reason? I mean looking at the mdn docs it's just a replacement for regular other syntax https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/if https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/V... So instead of having a css for x which defines e.g. dark mode and light mode separately, you can now define it via a single css rule. Where previously the "tree" forked at the beginning and attributes were set multiple times, depending on various criteria - now you set it once, and evaluate it's value depending on criteria div { background-image: if( style(--scheme: ice): linear-gradient(#caf0f8, white, #caf0f8); style(--scheme: fire): linear-gradient(#ffc971, white, #ffc971); else: none; ); } It looks like simple syntactic sugar to me
- tr45872267 11mo agoI should have read the docs for it then. Thanks.
- tambourine_man 11mo agoPlease provide evidence for that proof.
- TheOtherHobbes 11mo agoThe web should always have been a programming language, with all the usual constructs available in both the display and markup layers. But instead of a single unified standard library for the industry we got a sprawling, ludicrous mess of multiple poorly thought-out semi-compatible technologies, with an associated sub-industry of half-baked fixes and add-ons.
- enbugger 11mo agoIf only Lisp had better presense in modern code editors. Emacs is not enough, especially on Windows where it is super slow. I think this is what actually stops newcomers to start with Lisp and not Python
- embedding-shape 11mo ago> I think this is what actually stops newcomers to start with Lisp and not Python What stops newcomers is knee-jerk reactions about the (lack of) syntax, it's scary to see something that doesn't look like Algol, because everyone who does mainstream programming uses Algol-like languages. Introduce lisp to anyone who knows programming since earlier, and 99% of them will have a adverse reaction to s-expressions, before they understand what's going on. Once they understand, it makes a lot of sense obviously, but not everyone even has that kind of open mindset where they could understand if they wanted to.
- psychoslave 11mo agoSymbolic expression is one thing, I would personally find it rather cool to have more first class expression as building block everywhere. However I'm not found of using explicit parentheses all around. Even mandatory curly/square brackets are superfluous with a properly defined syntax ruleset.
- azinman2 11mo agoI find lisp to be a very non ergonomic language and am happy that python is the default.
- jimbokun 11mo agoCan you quantify that?
- speed_spread 11mo agoLet's just say that the weights of opening and closing parentheses do not cancel out.
- alwillis 11mo agoA gentle reminder: conditionals aren't new to CSS; @supports and @media are conditionals; so are style queries. if() just codifies behaviors and hacks [1] developers were already doing. [1]: https://lea.verou.me/blog/2020/10/the-var-space-hack-to-toggle-multiple-values-with-one-custom-property/ https://lea.verou.me/blog/2020/10/the-var-space-hack-to-togg...
- deleted 11mo ago[deleted]
- saghm 11mo ago> Get rid of treating things differently, make everything the same and make everything work with everything, code should just be data. "Code should just be data" doesn't imply the converse, though; there's arguably utility in having data that isn't code, even with the premise that code should be data.
- oifjoijoifj 11mo agoRegardless of should's or should not's, data is always code.
- drcxd 11mo agoYeah, code is data, data is code. Every Lisp programmer knows that.