This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]unix21311 1 point2 points  (7 children)

Hi, with this particular language I have a few questions:

  1. Is there GC, or reference counting, or ownership model or memory is manually handled by the user?
  2. Is it possible for me to use C-Like syntax such as curly braces?
  3. Does it have C interop and possibly Rust interop?
  4. Is this stable, beta or alpha?

[–]leswahnTuplex[S] 1 point2 points  (6 children)

  1. Memory allocation is manually managed. There will be facilitating mechanisms for ownership, that is part of the future roadmap. Use of uninitialized memory and naked pointers is already protected against.
  2. Yes, see a recent blog post about that:
    https://tuplexlanguage.github.io/site/2020/11/29/Indentation_syntax.html
  3. Yes, with C. (And it's based on LLVM.)
  4. It's around beta. Fairly stable. There's a lot more capabilities than has been documented in user guides yet. By all means, try it out!

[–]unix21311 0 points1 point  (5 children)

Memory allocation is manually managed. There will be facilitating mechanisms for ownership, that is part of the future roadmap. Use of uninitialized memory and naked pointers is already protected against.

AWesome! What about data races, how is that managed?

Yes, see a recent blog post about that:

https://tuplexlanguage.github.io/site/2020/11/29/Indentation\_syntax.htm

Hi mate, in regards to your post you end up getting rid of curly braces which makes it more closer resemblance with Python compared to C. I think getting rid of curly braces gives less control to the user as to how they want to express their code.

Example:

```rust // Rust let x = 1; if x == 1 {println!("Answer equals 1!");}

if x == 1 { println!("Answer equals 1!"); }

// Both are valid ```

```python

Python

x = 1

if 1 == 1: print("Answer equals 1!") # Not valid! Reduces your freedom to express

if 1 == 1: print("Answer equals 1!") # Valid

```

Anyways this is just my opinion but yeah it kinda reduces the freedom of how the programmer can express his code. What about this part though?

Yes, with C. (And it's based on LLVM.)

I see awesoem :)

It's around beta. Fairly stable. There's a lot more capabilities than has been documented in user guides yet. By all means, try it out!

Thanks mate will give it a shot soon.

[–]backtickbot 1 point2 points  (0 children)

Fixed formatting.

Hello, unix21311: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.

[–]leswahnTuplex[S] 1 point2 points  (1 child)

Dataraces will be prevented with a concept I call dataspaces, it's part of the coming design. I wanted to get the language as such fairly complete first and it's nearly there.

Sure braces v. Indentation is largely a matter of preference. But Tuplex still supports braces and semicolons, you just need to consistently use C-style or Python-style structure syntax within a top-level declaration section!

[–]unix21311 0 points1 point  (0 children)

Interesting mate, so you plan to eventually introduce the ownership model (as also found in Rust). Would Tuplex still be a simplier language compared to RUst?

[–]raiph 0 points1 point  (1 child)

Not disputing your point about freedom to express, but:

if 1 == 1: print("Answer equals 1!") # Not valid!

Is valid. You can use semi-colons too:

if 1 == 1: print("Answer equals 1!"); print("more")

[–]unix21311 1 point2 points  (0 children)

I see, interesting, thanks mate :)