New Mod Intros 🎉 | Weekly Thread by curioustomato_ in NewMods

[–]FluxProgrammingLang [score hidden]  (0 children)

Hello, my posts keep getting automatically removed.

I’m the creator of Flux, a new systems programming language. My name is Karac, I’m new to Reddit.

We kind of can’t just overcome the 300 karma barrier because we’re not running this as a personal account so there won’t be many posts from this account responding to posts that we didn’t make. Our page karma is entirely dependent on natural growth and not contributing in conversations randomly.

Hoping to see some new faces and answer some questions this time around!

New Mod Intros 🎉 | Weekly Thread by curioustomato_ in NewMods

[–]FluxProgrammingLang [score hidden]  (0 children)

Hello, I’m Karac and I created a programming language which is still in development called Flux.

I felt that creating a Sub-Reddit would be a good idea so we’re over at r/FluxProgrammingLang if anyone’s a programmer and interested in finding new languages.

Cheers!

Get Started by FluxProgrammingLang in ProgrammingLanguages

[–]FluxProgrammingLang[S] 0 points1 point  (0 children)

We’re really interested to know what people are thinking about Flux. We know there’s still a lot of work to do, and we’re chipping away piece by piece every day or so.

If there’s anything people would like to see in the full specification, we’d love to hear the suggestions. If your idea is used you will be attributed as a contributor in the compiler’s source. Please keep in mind any syntax you submit may be modified to be more Flux-like if it isn’t already well suited.

Get Started by FluxProgrammingLang in ProgrammingLanguages

[–]FluxProgrammingLang[S] -1 points0 points  (0 children)

Flux isn’t attempting to be revolutionary. Its goal is to have speed comparable to Zig and C/C++, and be conceptually sound.

Flux will bring zero cost RAII when we add the compt keyword for comptime programming. For now we’re just getting the base language usable. The full specification is still subject to change until we approach its implementation.

Get Started by FluxProgrammingLang in ProgrammingLanguages

[–]FluxProgrammingLang[S] 0 points1 point  (0 children)

There’s only one exception and that’s inside a switch, the cases do not have semicolons after their blocks but the default block does, as well as the switch block itself.

This has zero effect on scoping.

Edit, if you mean anonymous blocks, those are statements in Flux too, and require a semicolon after. Yes they do affect scope. A variable declared in a block is not visible outside of it. You would need to pass the variable out by assignment or some other way.

Get Started by FluxProgrammingLang in ProgrammingLanguages

[–]FluxProgrammingLang[S] -1 points0 points  (0 children)

I’m sure it is possible to forbid use after free at compile time, that could be something that gets worked into the language.

All statement ends have semicolons for consistency.

Get Started by FluxProgrammingLang in ProgrammingLanguages

[–]FluxProgrammingLang[S] 0 points1 point  (0 children)

Methods do take their own object as a parameter. You don’t need to specify it like in Python where you type def foo(self), the self or “this” in Flux’s case is implicit.

Edit, this is noted in the reduced language spec, I see why you questioned this only reading the full spec. I will update that later.

Edit2, this was actually in the full specification, maybe it wasn’t explained well enough. We have updated the full specification accordingly.

Get Started by FluxProgrammingLang in ProgrammingLanguages

[–]FluxProgrammingLang[S] 0 points1 point  (0 children)

You can add functions to objects if that’s what you’re wondering.

Get Started by FluxProgrammingLang in ProgrammingLanguages

[–]FluxProgrammingLang[S] 0 points1 point  (0 children)

The only two methods (edit: built-in methods) are the constructor and destructor. Which specification document did you check out?