Hacker Newsnew | past | comments | ask | show | jobs | submit | more owlstuffing's commentslogin

What if these were real, type-safe expressions in Java:

    2025 July 19   // → LocalDate  
    299.8M m/s     // → Velocity  
    1 to 10        // → Range<Integer>  
    Schedule meeting with Alice on Tuesday at 3pm  // → CalendarEvent
That's the idea behind binding expressions — a compiler plugin I built to explore what it would mean if adjacency had operator semantics. It lets adjacent expressions bind based on their static types, forming new expressions through type-directed resolution.

Details here: [https://github.com/manifold-systems/manifold/blob/master/doc...](https://github.com/manifold-systems/manifold/blob/master/doc...)


The manifold project[1] for Java provides that feature as "Structural Interfaces" which supports polymorphic variants.

The project also supports tuples that behave similarly.

    var person = (name: "Joe", age: 35);
    . . .
    Person p = person; // tuple's name, age properties satisfy Person record
1. https://github.com/manifold-systems/manifold


I hadn't come across the "Row" polymorphism term before, but it sounds more like structural typing -- for example TypeScript, and to a lesser degree Go, have structural interfaces that provide "row polymorphic" programming.

You could go further with variant structural typing, basically this is a broader form of type checking based on call compatibility, which answers the question -- is B#foo() callable as an A#foo()?

For instance, your `area` example requires `double` result types, otherwise a row type having `width` and `length` defined as `integer` columns doesn't satisfy `area`. But, result types are naturally covariant -- `integer` is a subset of `double` -- which permits us to accept `integer` in the implementation of `area`.

Similarly, parameter types are naturally contravariant -- `Shape` is contravariant to `Triangle`, thus `B#foo(Shape)` is call-compatible as a `A#foo(Triangle)`, therefore I can pass a Triangle to `B#foo(Shape)`.

The manifold project[1] for Java is one example where the type system is enhanced with this behavior using structural interfaces.

Note, this goes further with parametric types where function result types and parameter types define variance and other constraints.

1. https://github.com/manifold-systems/manifold


Yep. Using DuckDB against conventional data sources such as JSON and CSV or even Parquet has amazing potential. Paired with manifold[1]--a Java library that makes it all type safe--and it's a game changer.

1. https://github.com/manifold-systems/manifold/blob/master/doc...


Societal trust levels tend to correlate with cultural and racial homogeneity. The erosion of trust within Western civilization reflects this trend, particularly in the United States following the Immigration and Nationality Act of 1965 (Hart-Celler Act).

But this is hardly unique to the modern era. Consider ancient Rome: as the Empire expanded, it absorbed vast, culturally diverse populations. Over time, this growing diversity--combined with weak integration mechanisms--gradually strained social cohesion and undermined trust in institutions.

It’s a recurring pattern throughout human history.


That seems like a wildly questionable conclusion to draw. 60 years prior to that act, there was a huge influx of immigrants who would have been considered non-white at the time: Italians, the Irish, Germans, Eastern Europeans, etc. To the people of the time, that was a very non-homogenous period.


True, but there’s a key difference -- those earlier waves, despite being seen as "outsiders" at the time, still came from the same civilizational foundation. Europeans, whether Irish, Italains, Germans, or Poles, shared a common history shaped by Christianity, Greco-Roman influence, and broadly similar cultural norms. The friction was real, but over time, assimilation worked because there was enough cultural overlap to make it possible.

The post-1965 immigration wave brought in people from entirely different civilizations -- with no shared history, values, or worldview. That isn’t just "non-homogeneity," it’s civilizational fragmentation. And unlike the 19th and early 20th century European immigration, there’s no historical precedent where that level of deep cultural divergence integrates at scale -- not in Rome, not in Byzantium, not anywhere.


Or maybe it is just familiarity. You could have a village where everyone knows everyone else and most people have never travelled more than ten miles from where they were born. Or a city of thousands. Of course one will be more trusting than the other because people trust the people they are familiar with. And understandably more isolated communities will have more unique culture. Culture and ultimately race are more a consequence than a cause.


I think there is something more than that. India is fairly homogeneous. Was high trust decades (5+) ago. Trust getting lower today. Similar practices (trusting a stranger with your child) would have been conceivable in the same timeframe as mailing kids but not today. I think the other sister comment makes sense: protecting children had a very different definition back then than it is today.


Indeed, high trust requires more than homogeneity.


Cultural homogeneity I could see. But why would racial homogeneity have anything to do with it?


Because history treats them as a package deal. Tokugawa Japan saw foreign faces as existential threats. The Ottomans built trust only within ethnic/religious silos (millets). Rome demanded a trinity of assimilation: Latin language, Roman customs, and worship of state gods (later emperor cults).

Today's civic nationalism experiment rejects this link, yet no society has sustained high-trust diversity without such enforced unity. Rome threw everything at assimilation: shared language, values, identity above tribe, and state religion. It still fragmented.

So Western nations face an unprecedented gamble: Can they maintain cohesion without these historical levers? History offers no successful precedents, only warnings.


If Rome, which lasted two thousand years, doesn’t meet your bar, then your bar is too high.


The Roman Empire lasted about two to three centuries in its unified form before it began to seriously fragment.


You still had massive areas under unified control after that.

Two to three centuries is nothing to sneeze at, either. What are you comparing to?


I think there is something more than that. India is fairly homogeneous. Was high trust decades (5+) ago. Trust getting lower today. Similar practices (trusting a stranger with your child) would have been conceivable in the same timeframe as mailing kids but not today.


It's a recurring bullshit just-so story peddled by people who reject the complexity of actual history, which is why you provide no sources: you have learned Spengler and Hanania are unwelcome in polite society but not why, and there is no one else to whom you could turn. - well, Steve Sailer, I suppose.


thats not very convincing. you should also show that it wasnt say, inequality that killed the trust

canada is a high trust society because of its ethnic diversity, and the competition between french and englisg culture. europe is in a much higher trust state as the EU than it ever was as a set of competing great powers.

greece has plenty of homogeny, but is very low trust.

keeping racists happy is probably pretty uncorrelated to trust, compared to say, government services rendered, and democratic participation.


Wait, how is Greece low trust? I'd for sure mail a baby.


Maybe it stops recurring when we realize we are all human. Will it take the discovery of an alien race to realize we are one?

Savages.


I get what you're saying, but in Mexico the culture is fairly homogeneous but they have shit like this every other month:

https://www.newsweek.com/students-found-dismembered-bodies-t...

I mean you don't even need to click on the link to see what it's about.

I guess what I'm saying is that high trust societies come from societies that have severe consequences TBH.


Reminds me of a book, Mailing May[1], I read to my daughter and now my granddaughter. A true story of a family on a budget who sent their daughter to see grandma as mail cargo on a train. Cute story.

https://www.amazon.com/Mailing-May-Michael-Tunnell/dp/006443...


It is mentioned in the article - I'll have to look out for it


That book also has drawings that are at least moderately accurate of some of the trestles on that railroad line. They called them "rails on stilts", and that's a fairly accurate description.


But in this case the passes are manual!


so?


Dunno - to me it feels like the latex compiler should just run whatever it needs to for however many times until the output is done/usable, like basically all other compilers?


Imagine that your C or C++ compiler gave incorrect output, until you had run it some number of times. And that the number of runs required wasn’t obvious to the average user, so people just ran it again and again, to be safe. It’s absurd, yet we accept it for latex


Their comment conflates debugging with logging.

Professional debuggers such as the one in IntelliJ IDEA are invaluable regardless of one's familiarity with a given codebase, to say otherwise is utter ignorance. Outside of logging, unless attaching a debugger is impractical, using print statements is at best wasting time.


Perhaps consider that your experience is not universal and that others have good reasons for their decisions that are not simply ignorance.


I didn't say there aren't acceptable reasons to reach for the print statement, there are. But for the vast majority of codebases out there, if good debugger tooling is available, it's a crime not to use it as a primary diagnostics tool. Claiming otherwise is indeed ignorant if not irresponsible.


Debugging is for the developer; logging is for all, and especially those who need to support the code without the skills/setup/bandwidth to drop into a debugger. Once you start paying attention to what/where/how of logging, you (and others) can spot things faster then you can step through the debugger. Plus logs provide history and and searchable.


While this modification may contribute to layoffs, the general declining economy is the real culprit — the layoffs started long before the tax code change.


Well… React apps are a category of huge blobs of who-knows-what-but-it-works code.

In fact, I would be surprised if AI were to generate code as rube-goldbergery as React would have you write. Shrug.


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

Search: