Live data from Hacker News

Marko – A declarative, HTML‑based language

markojs.com

1–10 of 189 posts

Re: Marko – A declarative, HTML‑based language

#2

    

Today is ${new Date().toDateString()}

Random number: ${Math.floor(Math.random() * 100)}

Sorry, I don't like it. I already disliked that immensely in PHP. Not going back to that spaghetti mesh-up.

The intro is also incorrect in my opinion. It writes a "HTML-based language", but this is more a hybrid of HTML and JavaScript. Why is JavaScript not mentioned in the intro?

Re: Marko – A declarative, HTML‑based language

#3

Today is ${new Date().toDateString()} Random number: ${Math.floor(Math.random() * 100)} Sorry, I don't like it. I already disliked that immensely in PHP. Not going back to that spaghetti mesh-up. The intro is also incorrect in my opinion. It writes a "HTML-based language", but this is more a hybrid of HTML and JavaScript. Why is JavaScript not mentioned in the intro?

Don't blame Marko for this type of abomination. This is basically fancy react JSX.

ITS just bizzare people want to parse JavaScript at the same instance they're parsing html.

Also, LLMs are going to destroy any new framework. Someone's gonna need to figure out how to integrate these things into new tools. LLMs suck but it'll be much worse if they freeze innovations cause they're too expensive to chase the new hotness.

Re: Marko – A declarative, HTML‑based language

#5

Today is ${new Date().toDateString()} Random number: ${Math.floor(Math.random() * 100)} Sorry, I don't like it. I already disliked that immensely in PHP. Not going back to that spaghetti mesh-up. The intro is also incorrect in my opinion. It writes a "HTML-based language", but this is more a hybrid of HTML and JavaScript. Why is JavaScript not mentioned in the intro?

Don't blame Marko for this type of abomination. This is basically fancy react JSX. ITS just bizzare people want to parse JavaScript at the same instance they're parsing html. Also, LLMs are going to destroy any new framework. Someone's gonna need to figure out how to integrate these things into new tools. LLMs suck but it'll be much worse if they freeze innovations cause they're too expensive to chase the new hotness…

You two are complaining about different things. Note how the parent mentioned PHP as the reference.

Re: Marko – A declarative, HTML‑based language

#6

Today is ${new Date().toDateString()} Random number: ${Math.floor(Math.random() * 100)} Sorry, I don't like it. I already disliked that immensely in PHP. Not going back to that spaghetti mesh-up. The intro is also incorrect in my opinion. It writes a "HTML-based language", but this is more a hybrid of HTML and JavaScript. Why is JavaScript not mentioned in the intro?

Don't blame Marko for this type of abomination. This is basically fancy react JSX. ITS just bizzare people want to parse JavaScript at the same instance they're parsing html. Also, LLMs are going to destroy any new framework. Someone's gonna need to figure out how to integrate these things into new tools. LLMs suck but it'll be much worse if they freeze innovations cause they're too expensive to chase the new hotness…

LLMs can make use of documentation and example code.

Re: Marko – A declarative, HTML‑based language

#7
The problem when taking several languages and mixing them together this way is that the result is supposed to have brevity, but it’s actually unreadable. You need slash to mean something grammatical, colon has to say something, you can speak “open brace” in a way that anticipates; @ means “at”. This code looks more like a compression scheme.

Re: Marko – A declarative, HTML‑based language

#8

Today is ${new Date().toDateString()} Random number: ${Math.floor(Math.random() * 100)} Sorry, I don't like it. I already disliked that immensely in PHP. Not going back to that spaghetti mesh-up. The intro is also incorrect in my opinion. It writes a "HTML-based language", but this is more a hybrid of HTML and JavaScript. Why is JavaScript not mentioned in the intro?

How would you prefer to write those examples?

Re: Marko – A declarative, HTML‑based language

#10
post #8

Today is ${new Date().toDateString()} Random number: ${Math.floor(Math.random() * 100)} Sorry, I don't like it. I already disliked that immensely in PHP. Not going back to that spaghetti mesh-up. The intro is also incorrect in my opinion. It writes a "HTML-based language", but this is more a hybrid of HTML and JavaScript. Why is JavaScript not mentioned in the intro?

How would you prefer to write those examples?

Personally, I'd either just put the content in an ID-ed span and have a script to replace the content. Another, perhaps better, way is to use Alpine.JS which excels at this kind of stuff.
Post reply on HN