Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This sort of stuff is just a big nope:

    <let/count=0>
Why make a special language? Just use HTML and TypeScript that will be compatible with editors, tooling, etc. This is the same mistake Imba made.

It's a shame because the core of Marko looks phenomenal: streaming, fine-grained bundling, rendering performance, etc.

Also not sure about the file-based routing of Marko Run. That was a big reason why I abandoned SvelteKit.



File-based routing is fundamentally flawed and it cannot be fixed. A number of libraries opt for it since it's easier for newcomers to pick up, but eventually you run into all of the cases where you do need something else. This in turn leads you to a hybrid system of multiple things where there's no single source of truth and everything is spaghetti.


Care to make quite a simple example where file based routing would struggle?


Role based access control is one of the simplest examples, your routes need to be conditional and all come with related metadata for permissions and such. With file-based routing you'll then end up with your routes defined in one place and the configuration for them either in a separate different place or split up across the codebase. Whenever you need to change something you need to remember to do it everywhere else. If your routing is in code, you can define everything in one place with strict type checks, tests, and so on.


File-based routing makes sense for some systems, particularly CMS, where the content is files and that drives the navigation. But this is a more website thing, not an app thing, and many things want to be apps, not websites.


Let’s not pretend that useState() is plain TypeScript either. It’s a DSL in disguise.

JSX is amazing for stateless rendering of templates. Not so much for state management. That should really have been given a dedicated DSL. Here I think Marko did the right thing, why they then made even for-loops a dsl is more questionable.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: