Open cl3t0 opened 3 months ago
I agree. imho it would be nice as a statically typed language. Since it is written in rust, I think it would be cool if the language had the same syntax as Rust. An example of a DSL with rust syntax is Noir, which is also written in Rust.
But nevertheless Bend is super cool, I think the choice for picking a pythonic syntax was to appeal to as many people as possible.
We plan on adding a type system on top of Bend with Kind. It's important to have an untyped version that you can use because Bend has features which escape known type systems like unscoped variables.
for me the major pain point is I still find it really hard to parse functions without brackets mentally I would love bend but less like python
for me the major pain point is I still find it really hard to parse functions without brackets mentally I would love bend but less like python
You can use our functional syntax then! It's similar to haskell, but whitespaces are irrelevant and blocks are marked by brackets. https://github.com/HigherOrderCO/Bend/blob/main/docs/syntax.md#fun-syntax
We plan on adding a type system on top of Bend with Kind. It's important to have an untyped version that you can use because Bend has features which escape known type systems like unscoped variables.
Isn't Kind only functional syntax though? I like the friendliness of imperative to jump into, functional is scary
We plan on adding a type system on top of Bend with Kind. It's important to have an untyped version that you can use because Bend has features which escape known type systems like unscoped variables.
Isn't Kind only functional syntax though? I like the friendliness of imperative to jump into, functional is scary
Kind (not Formality or Kind1/Kind-Classic) is currently just a prototype. You can expect it to change in the future
We plan on adding a type system on top of Bend with Kind.
What does this means? Bend will have a type system or not? I think Kind is super cool but it looks very sophisticated, calls itself a "proof language", and don't look receptive. I don't know what is the community feeling about it, but for me Bend is the easier alternative to Kind. I'm not suggesting dependent types as in Lean or a complicated type system as in TS, just a simple type system. I think it will allow much more people to adopt the language for production.
I know it's a design decision and my opinion probably won't change anything, but I'd like to at least understand the reasoning behind the decision to make Bend without a type system.
@cl3t0 Kind looking scary has nothing to do with what it actually implements. The type checker currently being implemented in Kind will also be used as the underlying type checker for Bend. This will be completely transparent to the user. The fact it is expressive enough (to, say, prove full theorems) doesn't impact someone not interested in these features!
I'm currently adding gradual typing to Bend, tracking it in https://github.com/HigherOrderCO/Bend/issues/615
Hi everyone!
I'm just wondering why Bend is not statically-typed. Here's an example similar to this one.
The first thing that I thought was about setting
a
andb
as we do in Rust, for example. This would remove the need toopen
the variables. We can annotate function output and object fields as well.It looks cleaner to me. Also, currently if I try to pass the incorrect type to the
distance
function it does not throws an error about openinga
asV2
. It returns a non-sense value as if it had run correctly. Here's an example.Code output:
I don't think every language should be statically-typed as it's a design decision. However, such a non-sense output sounds like a bug to me. What do you guys are planning about it?