Is there a decent scripting language with C-like syntax and no annoying quirks...

Is there a decent scripting language with C-like syntax and no annoying quirks? Switching between C and scripting becomes a pain in the ass with all of the popular language's weird shit.

Javascript: has "prototypes" plus some weird ==/=== shit

Lua: has no switch statement, ~= and uses if/then for blocks instead of {/}, no ++/--/+=/-=

Python: whitespace instead of {/}, ew, also no ++/--

Ruby: still don't understand this one

Go: :=

Why are all the popular scripting languages absolute shit, syntax wise? Are there any better alternatives without shit syntax that aren't really known?

Sometimes just I want to make something quickly with C's nice syntax, but without all it's bullshit (when I don't need performance).

>inb4 use see sharp

Other urls found in this thread:

root.cern.ch/cling
nomad.so/2015/03/why-gos-design-is-a-disservice-to-intelligent-programmers/)
youtu.be/eAhWIO1Ra6M
stackoverflow.com/questions/39057625/powershell-on-linux-how-to-load-use-net-assemblies
twitter.com/SFWRedditGifs

use bash

Realistically, you're going to pick lua or javascript because both of them embed really well into large monolithic applications like games or web browsers.
Javascript is mostly C-like so long as you remember that every variable likes to become a string.

>without shit syntax

I'm not really looking for anything embedded, when I said scripting language I guess what I really meant is a relatively simple language that you can quickly write low-to-medium complexity programs in (that don't require performance) without worrying about low level stuff and strict rules, setting up an enviroment and cmake, all that time consuming stuff.

I'll probably get a shit ton of flak for this and I know OP doesn't like python, but I've grown to like python for automation. This is coming from a embedded OS person who lives C and thinks its pretty much the pinnacle of programming languages. Yeah the white space shit is weird to get used to but its not as bad as you'd think.

That said, I like python because they don't use use/learn all sorts of cute signs, symbols, sigils, jiggers and what have yous. It also tends to be more readable in the long run which is pretty great compared to the god fucking awful BASH and perl scripts I've had to with python.

I'd give python another shot.

just write a shell script if you don't want to write a real program, the syntax isn't that bad, but you do have to get used to the quirks of POSIX shell

shell scripting is so bad it's a reason to learn something like Python or Go just to avoid the disgusting syntax. Every time I'm working on a shell script and I start reading up on how to do something, it makes me want to puke.

Could you explain a time when this actually happened?
I bet it wasn't even that bad.

Sounds like you want a strongly-typed language. I recommend Java.

D, maybe. rdmd is handy

>scripting language
>C-like syntax
why would anybody want such a thing

Consider Ruby?

no {} but the end keyword makes it a lot better than python's take on it. Overall, iv been able to solve problems much quicker in ruby than other similar languages iv tried.

um.... c?
take the jsPill. or ruby. or perl. or sh.

also it's quite employable in the current year

>Go: :=
This is just shorthand and isn't required.
i := 0
var i = 0
both do the same thing

I see you are more concerned about aesthetics than actually getting something done. There is no cure for stupidity.

git gud fagit

You want a language like C, but with no annoying quirks? If it didn't have annoying quirks, it wouldn't be like C.

Try a C interpreter, so you can reuse the code in C later on.
The old CERN C/C++ interpreter: www.hanno.jp/gotom/Cint.html
The new CERN C/C++ interpreter: root.cern.ch/cling

Just write an interpreter for C

Javascript has had classes since forever. Just don't fucking use ==.

The := in go is just shorthand, you can assign variables just like in C if you really want to

This thread is surprisingly relevant. I, too, seek what you seek OP. Years ago I actually did this with the PHP CLI interpreter.

>Go: :=

what's the problem exactly?

Look csh and tcsh.

Perl u fucking retard

What's wrong with python or ruby? You easily get used to python's whitespace delimiting and you barely need to use i++ because of range(). If you're used to curly braces, ruby might feel a bit more natural though since you're delimiting with do/end.

Either way, they're both great languages for quick scripting because their syntax doesn't create retarded word salad. It just takes some time to get used to.

However, if you enjoy torturing yourself give bash or perl a try.

Why not write a preprocessor for your least disliked scripting language to make it work the way you want?

Not C-like but for scripting I'm learning GNU Guile, which is a scheme. Racket is very good also.

>range

>he doesn't implement his code recursively

you disgust me

> Can't understand weak type comparison
> Can't handle slightly different operators
> Can't handle whitespace
> Can't learn a language designed to be easy to learn
> Can't handle different operators

> “Why are all the popular scripting languages absolute shit?”
The answer comes from within.


To actually answer your question, look at Perl.

literally c#,java.

Those aren't scripting langwayjes boi

but they are what op wants.a nice c-like syntax with an easy to learn/use and safe language.

I think Go has the idea that they're very C like and 'simple'. But I can't vouch for it. I don't use it.
There's complaints like this (nomad.so/2015/03/why-gos-design-is-a-disservice-to-intelligent-programmers/) but C doesn't fare all that well against these criticisms either. So maybe you don't care?

Sean Barret (of stb_libraries and Looking Glass studios fame) uses C as his scripting language. He tried making his own C-like scripting language but realized what he mainly needed was good libraries (that's the gist of the talk below).
youtu.be/eAhWIO1Ra6M

Lily

could you not just use c with an interpreter??

/thread

>Always use undefined, never use null
>Always use === over ==, except when comparing against undefined (because x == undefined is the exact same as x == null)
>Don’t fuck around with the prototypes
>Always use let and const over var
There, I just fixed JavaScript for you.

>Lua: has no switch statement, ~= and uses if/then for blocks instead of {/}, no ++/--/+=/-=
>Python: whitespace instead of {/}, ew, also no ++/--

Python has no switch statement either, nor real constant variables, but you didn't point those out either, it's obvious you don't know jack about the languages you are talking about aside from stuff you read from Sup Forums turds

Lua is cute.

tcl

Well if you're on Windows, Powershell is kind of magical.

PowerShell's on Linux too.

>Why are all the popular scripting languages absolute shit, syntax wise?
Because C did it wrong

>Go: :=
Really, nigger?

Sure but I've never tried it there - PS isn't magical because of the shell scripting capabilities (though those are great too) but because of the ability to import .net modules which I don't know if it has on Linux?

iirc Microsoft opened .Net as well so Linux should have it

>Because C did it wrong
/thread

...sounds fake but maybe isn't.

I'll check.

If it's true though, Mono developers on suicide watch.

Can't find a lot about it

This is probably the best:

stackoverflow.com/questions/39057625/powershell-on-linux-how-to-load-use-net-assemblies

>PowerShell on Linux is based on CoreCLR while mono is a clone of the CLR / full framework. The assembly you are using is a full framework one and cannot load in CoreCLR since it is based on mscorlib and not System.Runtime.
>In a year there will be a workaround (maybe) with the upcoming .NET Standard 2.0.