4 ms·
>IMO if you need a long doc like this pointing out the sharp edges, then I think you've done a poor job in designing the framework. x1000 upvotes. One alterna
by rawoke083600 4y ago
>IMO if you need a long doc like this pointing out the sharp edges, then I think you've done a poor job in designing the framework.
x1000 upvotes.
One alternative is of course svelte, the unofficial-slogan (svelte) is/was that you can explain it to someone or learn it yourself in an afternoon.
Reminds me a lot of C++ vs Go in terms of Public/Private/XYZ
Go:
To make a something public, start the var name with uppercase.
C++:
To make things public read the Chapter on "Access Modifiers".
- DavidPiper 4y agoWhile I agree with your point, the example you gave feels like a straw man. Or at least, a separation of "sharp edges" and "long documentation needed". Phrased differently: Go: To make a something public, start the var name with uppercase. C++: To make things public, type the word 'public'. The Go pattern seems like more of a sharp edge than the C++ version, even though the C++ version might need more reading to learn.
- the_gipsy 4y agoGo using casing for access is quick but is awful when you just want to change the access later on. It's not like writing `pub` before the var/field is suddenly javaland, see rust.
- aatd86 4y agoWhat do you mean changing the access? You mean from private to public? In that case, you would just have to change a single package. (also, if yes: does it happen often and is that really what we should optimize for then?)
- the_gipsy 4y agoYes, you have to rename a var/field to change public/private. It's not a huge deal of course, just an annoying exception. Re: optimization, what does using casing instead of an explicit `pub` prefix optimize for, exactly? Compiler complexity? Typing ergonomics?
- rawoke083600 4y agoYou ever read the access modifier rules of C++ ? Can you explain that to a newbie in 2 sentences ?
- the_gipsy 4y agoNo, but I don't think that's relevant. Rust or Java access is doesn't require much typing ceremony, and doesn't require you to rename a var to change the access.
- aatd86 4y agoI think it optimizes for readability.
- danielvaughn 4y agoI got up and running in Svelte in literally 5 minutes, and it blew me away. I just started building and referencing the docs along the way. But then...I ran into their reactive model, and spent an entire day trying to debug (what I thought was) a very simple problem. I can't recall the details but I remember it had something to do with the order of updates? It was super confusing. Moral of the story is that there are always trade-offs.