3 ms·
You should read further down in the article where it expands on some more advanced concepts -- but in general you're right -- it is really similar to existing l
by marviel 4y ago
You should read further down in the article where it expands on some more advanced concepts -- but in general you're right -- it is really similar to existing languages.
I wonder as its power changes, what paradigms it might suggest we break out of.
I'd also recommend reading its responses that are non-code in detail -- for instance, in the comment where it introduces TenetLang, GPT-4 actually calls out that it's re-using ideas. I would assume intentionally, because it knows what people are most familiar with.
> GPT-4
> In this new language, called "TenetLang," we'll combine a simple syntax inspired by Python with some features from functional and object-oriented languages. Here is an overview of some design choices:
- Indentation-based scoping, similar to Python.
- Strong typing with type inference, inspired by TypeScript and Kotlin.
- First-class functions and closures, similar to JavaScript.
- Immutable data structures by default, with optional mutable counterparts.
- A concise lambda syntax for anonymous functions.
- Pattern matching and destructuring, inspired by Haskell and Rust.
- Built-in support for concurrency using async/await and lightweight threads.
- Interoperability with other languages using a Foreign Function Interface (FFI).
- karmakaze 4y agoGPT-4 didn't learn the distinction between strong types and static typing. That makes sense as much writing also doesn't make the distinction. e.g. Python has strong types, can't add 1 + "2".