bhai-lang
bhai-lang copied to clipboard
Make It an ACTUAL programming language.
Description
To make it a serious programming language, we'll need to add atleast barebones for a lang.
- Static types
bhai ye hai a = 0tobhai ye shabd hai a = "strings" - Runtime features
dekh $PATHfor getting current PATH. - Add more data types.
| Type | Syntax |
|---|---|
| String | shabd |
| Number | ginti |
| Array | dhara |
| Object | Could be determined by the class |
- Object oriented features like class(for very least) and inheritance(for mainstream langs)
Domain
Bhai Lang
Type of Contribution
Enhancement
Code of Conduct
- [X] I follow Contributing Guidelines & Code of conduct of bhai-lang.
mai ispe contribute karu bhai??
mai ispe contribute karu bhai??
If you are sure in every way(like optimization, size, complexity) then just go ahead 😋
added a PR for Funda, it will introduce functional programming
you can check it in preview build https://6234ac37ec8e100008f579b5--bhailang-preview.netlify.app/#playground
added a PR for Funda, it will introduce functional programming
you can check it in preview build https://6234ac37ec8e100008f579b5--bhailang-preview.netlify.app/#playground
⭐ bhai you are awesome!
Lekin homepage me bhi toh funda daal do.
Should I close this issue now?
Edit: although less than 10% of my issue is resolved.
I am working on adding class
How does this look?? these features are built on top of the changes in the last PR, I can add a PR once the last PR is accepted
You are just awesome!
How does this look?? these features are built on top of the changes in the last PR, I can add a PR once the last PR is accepted
![]()
Hey wait. 😐 Where is new keyword implementation?
What you have implemented is just same as getting output of a function. I think just refactor and everything will be just fine.🥲
samajh le bhai janwar {
}
samajh le bhai kutiya jo ki ek janwar hai {
// Same
}
Bhai ye hai Alice = bana kutiya()
kutiya.bhouk()
I'm using bana as new but you can use a better keyword
new is not necessary for this (take python for example), by default it creates a new object, and it's different than a function, functions will not have methods of it's own or it's own data members,
see the example below:
newis not necessary for this (take python for example), by default it creates a new object, and it's different than a function, functions will not have methods of it's own or it's own data members,see the example below:
![]()
I've only worked with JS/TS and C#. Both of them use new so I thought same for bhailang. But python's implementation is also good.
naya keyword can be used
No need for unintended naya if @thecodacus has already implemented it(python like syntax).
#257 Added a pr for class feature