SaptakBhoumik / Peregrine

A blazing fast language for the blazing fast world(WIP)
https://peregrine-lang.github.io/
Mozilla Public License 2.0
1.46k stars 76 forks source link

A language specification #23

Closed wilsonwang371 closed 3 years ago

wilsonwang371 commented 3 years ago

Do you have a language specification?

SaptakBhoumik commented 3 years ago

I will create it soon

wilsonwang371 commented 3 years ago

I am thinking there are few things that might be very helpful in swallow's success:

  1. Static typed
  2. No GC
  3. Some of the good coding designs in Rust language
  4. Easy to make use of multiple CPUs. (Such as coroutine)
yukendhiran commented 3 years ago

Is that platform independent language???

yukendhiran commented 3 years ago

Can it be a scripting language too?

yukendhiran commented 3 years ago

Can it be both compiled and interpreted ??

wilsonwang371 commented 3 years ago

Can it be both compiled and interpreted ??

You don't understand the reason for my listed item.

First, static typed, compared with dynamic typed, is definitely an advantage in a compiled programming language.

second, GC is really a bad thing for golang now. Without GC, it will be much easier to reach a higher performance.

With borrow & lend that is similar to Rust, now most of the programming errors can be avoided.

These are real problems we are facing in coding development and I believe a next-generation programming language should address these 4 issues.

ethanolchik commented 3 years ago

Can it be a scripting language too?

Very soon, yes

SaptakBhoumik commented 3 years ago

I am thinking there are few things that might be very helpful in swallow's success:

  1. Static typed
  2. No GC
  3. Some of the good coding designs in Rust language
  4. Easy to make use of multiple CPUs. (Such as coroutine)

Well yes it will have all these features

SaptakBhoumik commented 3 years ago

@yukendhiran

Is that platform independent language???

It depends on how you look at it

Can it be a scripting language too?

We are working on it

Can it be both compiled and interpreted ??

Yes. It will have 2 backends. 1)GCC- Meant to be used in production and is very fast. Compiles your code directly to machine code 2)libtcc-Meant to be used for testing and scripting purposes and is a bit slow since it is interpreted

yukendhiran commented 3 years ago

I'm waiting for this language

ethanolchik commented 3 years ago

Thanks!

Nukiloco commented 3 years ago

Can it be both compiled and interpreted ??

You don't understand the reason for my listed item.

First, static typed, compared with dynamic typed, is definitely an advantage in a compiled programming language.

second, GC is really a bad thing for golang now. Without GC, it will be much easier to reach a higher performance.

With borrow & lend that is similar to Rust, now most of the programming errors can be avoided.

These are real problems we are facing in coding development and I believe a next-generation programming language should address these 4 issues.

I do like all of these points, though I just hope all the annoying stuff from Rust doesn't get copied over into this language. One of the things I liked from rust was the error checking while coding. Though the problems and how you program it in it in my opinion is a serious drawback to the language. For a package manager, I think something similar to NPM would probably be good.

Also can someone explain how the borrow and lend system from Rust helps to prevent errors?

SaptakBhoumik commented 3 years ago

Also can someone explain how the borrow and lend system from Rust helps to prevent errors?

By preventing memory leaks

yukendhiran commented 3 years ago

It's a request ,make sure you have well documented and when you publish , publish a book that help a neophyte to learn this language from scratch and advantages of using this language over other

SaptakBhoumik commented 3 years ago

Sure