Urgent.News

One page, thousands of outlets. See who else covered it.

Editions

Tech

Why Should the Language Change the Moment I Build a UI?

In ordinary application code, I create values, pass them to functions, and distinguish between cases. Then Web UI begins, and sometimes the whole world changes. Component. Hooks. JSX. Store. Lifecycle. Subscription. All of these things exist for reasons. I've used React and Vue for years, so this isn't an argument that they should all disappear. But at some point I started wondering: Why do I…

When building a user interface, should the language change? That's the question I posed to myself after years of working with React and Vue. The answer, at least for the Seseragi framework, seems to be no.

In Seseragi, a component is simply an ordinary function that takes a model and returns Html. There's no special syntax for declaring a component, making it feel just like any other function in the language.

The UI can be expressed as ordinary values and data constructors, which can be easily manipulated using existing language features like match expressions and composed together. State is represented as Signal values that can change over time, but this doesn't require a separate store or worldview.

The framework's development order mirrors the same progression: starting with data types, then match expressions, ordinary functions, Effects, Signal, and finally Html as a value. This incremental approach makes the Web application feel like it naturally grew out of the language, rather than a framework being imposed upon it.

The biggest takeaway is that Seseragi's Web UI doesn't force users to use a different programming paradigm. Instead, it allows them to continue using ordinary language features, gradually leading to a development experience that feels more like working with a framework. This approach has been surprisingly effective and engaging so far, and it's an ongoing experiment to see how it evolves.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Your Keras model config can contain a marshalled Python code object

Most conversations about malicious ML artifacts stop at pickle. That's understandable — torch.load calling __reduce__ is the canonical example, and it's the one everybody has read about.

  • Keras models can embed Python code objects within their configuration
  • Unmarshalling .keras files to inspect code is unsafe
  • Aisbom v1.3.0 identifies Lambda layers and embedded code as CRITICAL risks

What If Programs Were Mostly Just Values Flowing Through Functions?

I've never particularly enjoyed reading code that makes me suddenly switch from following values to chasing control flow. A variable gets assigned halfway through. A function returns halfway through.

  • The author prefers code that shows values flowing through functions.
  • They created F-Box to maintain smooth value flow with a pipe helper.
  • Seseragi programming language emphasizes pleasant, intuitive code structure.

More from Sunday 16 August →