Frontend Language Feature Matrix
from mint_lang@programming.dev to programming@programming.dev on 16 Jul 15:26
https://programming.dev/post/34009175

Hi! I’ve created this page to showcase the features of Mint (since there are so many) and their corresponding versions in other similar languages.

#programming

threaded - newest

somegeek@programming.dev on 16 Jul 16:30 next collapse

This is very incomplete. Like to see it become more complete.

Clojurescript and purescript are my favourites.

occultist8128@infosec.pub on 16 Jul 17:03 next collapse

just hoping crystal gets more attention from the community ^_^

wise_pancake@lemmy.ca on 16 Jul 17:49 next collapse

Suggestion: please update the colors so colorblind people like me have an easier time reading this chart

Aatube@kbin.melroy.org on 16 Jul 17:58 next collapse

or add symbols. probably add symbols.

nickwitha_k@lemmy.sdf.org on 17 Jul 16:45 collapse

Question: Can you suggest resources or tips for picking colors that are friendly for color-blind people? Is it easier to differentiate based upon saturation?

wise_pancake@lemmy.ca on 17 Jul 17:18 next collapse

I try to differentiable based on lightness/brightness

I don’t have any go to tool :( bit of over color is father than the other is easier to see

nickwitha_k@lemmy.sdf.org on 17 Jul 23:24 collapse

Thank you!

hikaru755@lemmy.world on 18 Jul 07:35 collapse

There are tools that can change the colors of your screen to simulate different kinds of color blindness, that makes it pretty easy to test for the basics. I’ve been using this one in the past: colororacle.org

But in general, it’s also just a good guideline to never rely only on color to communicate important information, and always also have a graphical or textual cue to go with the color.

ZILtoid1991@lemmy.world on 17 Jul 09:31 next collapse

I’m pretty sure that Mint is capable of exceptions.

ExLisper@lemmy.curiana.net on 17 Jul 10:08 next collapse

I do my frontend in Rust thankyouverymuch.

olafurp@lemmy.world on 17 Jul 10:23 next collapse

TS as a statically typed language is not what I would call it. It’s a language with enforced type annotations but can be circumvented pretty easily. For example when receiving a JSON from an http request a string field can be just whatever.

FizzyOrange@programming.dev on 17 Jul 16:27 collapse

That’s nitpicking. It is statically typed. Is Dart not statically typed because it has dynamic.

You could call it “gradually typed” if you want to be pedantic.

can be circumvented pretty easily

That means it isn’t sound.

olafurp@lemmy.world on 17 Jul 19:02 collapse

Gradually typed is a great description because it’s neither fully static or dynamic. TS does allow you to circumvent the types too easily to be called statically typed.

const strings: string[] = ([1] as any[])

Is ok in TS land so the type of strings is not really static so to speak because you can assign whatever to it. Writing this in Dart would give

error - The argument type 'List<dynamic>' can't be assigned to the parameter type 'List<string>'. - argument_type_not_assignable

if I’m not mistaken.

hikaru755@lemmy.world on 18 Jul 07:54 collapse

I get your point, but that’s not a great example. Kotlin is a statically typed language, and this compiles (and runs!) just fine:

val test: List<String> = listOf(1) as List<String>
println(test) // prints "[1]"

Even val test: String = 1 as String will compile, but at least gives you an exception at runtime, which the equivalent typescript wouldn’t.

olafurp@lemmy.world on 18 Jul 10:25 collapse

That’s crazy, I thought that would be an invalid cast or something.

hikaru755@lemmy.world on 18 Jul 11:03 collapse

Unfortunately not. You do get a warning that it’s an unchecked cast at least.

Granted, the issue here is generic type erasure, which was a tradeoff that was decided on for backwards compatibility when generics were first introduced to Java, so it’s not like an actually desirable feature of the language. But the point is that this wouldn’t be reason for anyone to not call Java and Kotlin not statically typed, their type system is just a bit weaker than others in certain aspects

Mubelotix@jlai.lu on 17 Jul 10:33 next collapse

Exceptions are not good. Alternatives are better

Kissaki@programming.dev on 17 Jul 13:18 next collapse

What are "frontend language"s?

Just wondering if this is very incomplete or due to scoping.

FizzyOrange@programming.dev on 17 Jul 16:25 collapse

Languages well suited for client side web code. Most of these (maybe all?) compile to JavaScript and are designed for the web.

Kissaki@programming.dev on 18 Jul 05:16 collapse

Web is just one kind of frontend though. And there’s more ways to target web with JavaScript interfacing than transpiling to JavaScript.

FizzyOrange@programming.dev on 18 Jul 06:19 collapse

Sure, but without further context, “frontend” means the web. And “frontend language” means languages that were designed for the frontend. You can write a website fromtend in Python, but you absolutely shouldn’t!

You can use languages like Java and Rust too which are more reasonable options, but they aren’t “frontend languages”.

Kissaki@programming.dev on 17 Jul 13:20 next collapse

Why is single line comments listed when it’s green for all of them? Do they not have multi-line comments?

FizzyOrange@programming.dev on 17 Jul 16:28 next collapse

Interesting, but the colours for exceptions are inverted. One of the features that Elm touts on its front page is that it doesn’t have exceptions.

Structural equality is also debatable.

TehPers@beehaw.org on 17 Jul 19:49 next collapse

As far as I can tell, the table is purely informational and not advocating for any features as being positive or negative.

Otherwise, yeah the colors make no sense.

FizzyOrange@programming.dev on 18 Jul 06:20 collapse

Green is good and red is bad. If that wasn’t the intent they should have used different colours.

TehPers@beehaw.org on 18 Jul 08:15 collapse

My point is that the colors make so little sense that the only thing that makes sense is to decouple the colors from any meaning.

This table is so lacking and flawed that I don’t even know why there’s so much discussion around it.

xav@programming.dev on 18 Jul 06:27 collapse

I would have also chosen green for “no exceptions”. This is the way.

KindaABigDyl@programming.dev on 17 Jul 19:18 next collapse

This is how I learned about ReScript

0xDREADBEEF@programming.dev on 18 Jul 19:47 collapse

I love that little language. I learned ReasonML for fun and built a few toy apps a long time ago, but ReScript has been cool to watch

SlartyBartFast@sh.itjust.works on 17 Jul 23:39 next collapse

That’s why I do everything in PowerBI, but my data sources are entirely manually-maintained excel files

Colloidal@programming.dev on 18 Jul 00:29 next collapse

Not seeing any links to a page, what’s up?

selayar@ani.social on 18 Jul 09:13 collapse

Technically, Purescript has support for exceptions since it compiles to javascript, but the more standard way to encode exception is through monadic interface