Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
nauticacom
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
nauticacom
5y ago
Sure, that works for some specific problems where you're computing a value from a defined set of data types. "Subset of this data" was an example I've encountered in the past and used here because it has clearly distinct
32.
▲
by
nauticacom
5y ago
It's pretty silly to claim that one way or the other is "obviously" wrong. A primary objective of defaults on the web is to never hide content; if "width" specifies the width of the content itself (i.e. box-sizing:
33.
▲
by
nauticacom
5y ago
I (happily) write a lot of OOP code, "inheritance is bad, use composition" is such a trite and unhelpful dogma that gets in the way of any actual discussion about where inheritance is useful. IMO, the case where inheritance makes
34.
▲
by
nauticacom
5y ago
> The thing though is you can build higher-level abstractions on top of the base language That's true, but since the base language is so low-level there are certain things you can't get away from. You can never get away from th
35.
▲
by
nauticacom
5y ago
Ah, that's interesting! I'm not the person who used "syntactic bureaucracy" but I did interpret it roughly like that, yes. I'm not sure what phrase I would use to describe "more syntactical constructs" as
36.
▲
by
nauticacom
5y ago
> What do you consider syntactic bureaucracy? I would assume "amount of syntax required to express a given concept," with the use of the word "bureaucracy" implying that some concepts require too much syntax relative
37.
▲
by
nauticacom
5y ago
Sure, but there's a purpose-built tool that doesn't overload an already existing concept, and it's called keyword arguments
38.
▲
by
nauticacom
5y ago
I suppose it could be, but imo it starts diluting the value of domain modeling if everything is given the same weight. A bundle of inputs to a function just doesn't have the same weight as a struct representing a repository or a commit
39.
▲
by
nauticacom
5y ago
It's a spectrum, though. A language can be between 0 expressiveness (Go) and 100 expressiveness (Perl, maybe Lisps), and claiming that the only way to avoid the mysterious evil team member who will wreck your codebase is to patronizing
40.
▲
by
nauticacom
5y ago
Because concepts in programming languages mean things. A discrete, named entity (a struct) is a distinct concept from a way to increase readability of a function call (keyword arguments). Overloading them with the same language construct is
41.
▲
by
nauticacom
5y ago
Not really? I suppose what I meant by that was that, if you make a struct, it should represent a concept that makes sense outside of the context of passing it to one function in particular; you're signalling that this collection of dat
42.
▲
by
nauticacom
5y ago
Even if you're not doing OOP you're modeling your domain in one way or another. Whether those models are explicit and expressive or not, and how you define those qualities, is another question. In neither case are the arguments to
43.
▲
by
nauticacom
5y ago
I thought of Dart as a counterpoint, but if anything it's actually more proof. Dart kinda failed as a language in the browser because Google didn't really push it, and when they did it got push back . Now that they've repur
44.
▲
by
nauticacom
5y ago
Sure, if you're pushing things through a command bus or something. Otherwise you're just stretching it. If you wouldn't use it in a sentence to describe a use-case, I'd say that it's probably not a concept. Would it
45.
▲
by
nauticacom
5y ago
I'd agree that it was one of their design goals, but I wouldn't go as far as to say that it makes the language "readable and usable." That depends on what your values are. Go's philosophy (which clearly flows from i
46.
▲
by
nauticacom
5y ago
One thing that the people saying "just use a struct for keyword arguments" are missing is that structs should signal intent, i.e. "this is a concrete concept in the system." A Repository, Commit, Message, Person, etc. st
47.
▲
by
nauticacom
5y ago
It's because Rust's fundamental concerns—ownership, error handling, mutability, etc.—are at a much lower level than most applications need to deal with. Rust has the (imo unrealistic) goal of trying to fit an incredibly broad rang
48.
▲
by
nauticacom
5y ago
I find it funny whenever Tailwind people tout that you "don't have to name things." You still have to name your JS-framework-of-choice components, and you still have names for each of the parts of a single component that ge
49.
▲
by
nauticacom
5y ago
Yes, because everybody has willingly surrendered to the horrors of React hegemony
50.
▲
by
nauticacom
5y ago
Thankfully as of v7 these are all bundled under a single "magick" command (with symlinks for compatibility). Hopefully in the future these can be removed
51.
▲
by
nauticacom
5y ago
It's no wonder this article was written in 2006. One of the problems describes DBAs ! Has anyone heard of a DBA in the last decade? Most of these other problems are just... solved? Any decent language will let you override the meaning
52.
▲
by
nauticacom
5y ago
Okay so I write a prepared statement, send it to my database with some parameters, and get back some rows. Now what? How do I turn those rows into structs or objects or whatever that I can pass around for business logic? Maybe I write a fun
53.
▲
by
nauticacom
5y ago
Right, but for most of that stuff I can just write a one-off query, munge it into the ORM's objects and pass that off to my view for rendering. But probably 80% of my queries are "get this object by ID" or "get these obj
54.
▲
by
nauticacom
5y ago
Never understood the hate for ORMs. I need to map from my data storage to my domain model somehow, why write all that code myself
55.
▲
by
nauticacom
5y ago
Alternate, more accurate title: Create cookie-cutter website layouts that look like every other bland landing page. Bonus points if they use Tailwind.
56.
▲
by
nauticacom
5y ago
So cool! I love being able to break accessibility and the fundamental building block of the web :)
57.
▲
by
nauticacom
5y ago
If you need to run it through a "transform" step, in this context, it's compiling. What it ultimately gets transformed to, and the implications of that, is a different discussion
58.
▲
by
nauticacom
5y ago
How do YOU do form validations? I use some server-side library to do it (take your pick for your language/framework of choice) which then sends it back to the user, in most cases automatically wiring up old field values and err
59.
▲
by
nauticacom
5y ago
I've tried these technologies ... and for me they are less productive than the ways I know how to build API-first, JavaScript web apps I think I feel the same way you do, except the other way around. I genuinely can't unde