Share your repls and programming experiences

← Back to all posts
What features do you want in a language?
Haaruun (184)

Sooo, I had this idea for a while, there are so many programming languages out there, and each one has there own focus. Python is readable and flexile while still being easy to learn. Rust gives you the efficiency of low level languages while still being concise. Javascript is ... well ... Javascript.

What if there was a language, with a syntax like JSON but with the power of something like Python. There is something with the syntax and basic features of what I want, JSONata but it's only for data transformation, no I/O and minimal functions.

My idea is to take JSONata, attach something like JSONstore for permanent data storage, and add some of the function features of javascript (its useful for something finally).

What are your thoughts, if people like it enough, maybe i'll try and make it with ANTLR.

EDIT: I just realised I said JSON 3 - 4 now - times in this post.

mwilki7 (1134)

Functional languages scare me a little bit but one thing I like about them is pattern matching.

Makes code both compact and easy to read:

let notJack name =
    match name with
    | guest when guest = "Jack" -> printfn "%s, you are not invited!" name
    | _ -> printfn "Welcome to the party, %s!" name

let rec welcomeToParty list =
    match list with
    | []               -> None
    | guest::others    -> 
            notJack guest
            welcomeToParty others

let listOfNames = ["Jack"; "Jill"; "Will"; "Hill"; "Dead"; "LoL"]
printfn "\n---- Party ----"
welcomeToParty listOfNames


Jack, you are not invited!
Welcome to the party, Jill!
Welcome to the party, Will!
Welcome to the party, Hill!
Welcome to the party, Dead!
Welcome to the party, LoL!

Haaruun (184)

Doesn't Ruby have this feature? Another cool thing about pattern matching is if it's also applied to function parameters like in elixir, Definitely will add to the feature list. @mwilki7