Instead, my advice is to create individual designs for each, share when it makes sense, but actively diverge when it’s good for your customers. There doesn’t need to be a single version of a page.
Your mileage may vary.
709 karma · joined March 20, 2009
http://github.com/Nycto
Instead, my advice is to create individual designs for each, share when it makes sense, but actively diverge when it’s good for your customers. There doesn’t need to be a single version of a page.
Your mileage may vary.
https://pomax.github.io/bezierinfo/
Anecdote != data
Cyber did an episode that covered this in more detail, btw: https://www.vice.com/en/article/z348k3/cyber-why-concert-tic...
https://uploads.peterme.net/nimsafe.html
(Source: https://www.reddit.com/r/nim/comments/maj1lz/nim_safety_in_c...)
http://journal.stuffwithstuff.com/2011/03/19/pratt-parsers-e...
1. Type erasure
2. Using sealed classes requires instantiation, while the Rust version is zero overhead.
Also: https://github.com/amzn
The problems arise when you interop with Java. At that point, shit can be null and you just don't know. My point is that it's the same problem in Scala as it is in Kotlin: Java interop adds a measure of unpredictability that needs to be handled at the touch points.
That's not _bad_, but the argument being made by the OP was that nullability in Kotlin was unsafe and inconsistent.
val x: Option[Int] = nullTo provide a bit more depth, a large number of the developers I work with (folks I respect) don't _want_ the kitchen sink. They see it as dangerous. Even if _they_ can handle it, they know that there are a lot of people who can't. Sure, you can limit the features you use via convention, but that is shifting a tech problem to being a people problem -- you usually want to go the other direction.
You can "yeah, but..." all you want, but it's a valid, reasonable opinion. It's subjective, but that's just the way of it.
My team has a significant investment in the JVM. I despise working in Java because of how heavy it is to write. I like Scala, but the team I'm on finds it too complicated. Clojure is out because nobody on the team wants to write lisp. And Groovy doesn't have types. We looked at Ceylon, too, but at the time we hit a lot of compiler issues (if I remember correctly).
So where does that leave us? There are likely other languages we could choose that target the JVM, but the pragmatist in me says I don't want to stray too far off the beaten path for this.
Is Kotlin perfect? No. But is it a better developer experience than Java? Oh hell yes.
For example, the 'firstOf' template above would be responsible for scanning the AST it's given, taking each node and putting it in to a sequence. Then it instantiates a Handler with that sequence and returns it.
I've written a number of Nim libs at this point. Rosencrantz is missing the idiomatic 'feel' of Nim -- blocks and trees. I would rather see a syntax like this:
let handler = firstOf:
get:
firstOf:
path("/api/status"):
ok(getStatus())
pathChunk("/api/message"):
accept("application/json"):
intSegment(id):
let message = getMessageById(id)
ok(message)
post:
path("/api/new-message"):
jsonBody(msg):
let
id = generateId()
saved = saveMessage(id, msg)
if saved: ok(id)
else: complete(Http500, "save failed")
I believe all of that should be possible using templates; grab the AST for the `stmt` passed to each function, then iterate over each node.https://github.com/CausalityLtd/ponyc/blob/975d9f6c60553030e...
Obviously, I have never written anything in Pony, but this absolutely seems like an advanced use case. It exists because 'C' has a concept of null, so it needs to be handled. The manual even admits that all bets are off when dealing with the FFI.
Also, this isn't self-promotion at all. I'm not in any way associated with that blog. I just like the content.
Different perspectives and learning styles, I suppose. I'm not trying to be argumentative, just briefly laying out my thoughts. Cheers
For anyone interested, this is the article I hand out when someone asks me about designing a REST API: http://www.vinaysahni.com/best-practices-for-a-pragmatic-res...
And here is the HN discussion from when it was originally posted: https://news.ycombinator.com/item?id=5819231
Your first paint is coming it at around 1.8s. You could probably get that under the 1s mark just by consolidating your resources. This is even more important when dealing with a library like Angular.