Just to reiterate:
FreeBASIC and VB.Net have both done this. Hell, classic VB would have if it had survived. There really isn't an argument that it's not BASIC-ish that I can see.
Printable View
Just to reiterate:
FreeBASIC and VB.Net have both done this. Hell, classic VB would have if it had survived. There really isn't an argument that it's not BASIC-ish that I can see.
@Niya: I tried your search and came up with a wiki page on Augmented Assignment as the top item. After that it was all Python. I'd say that your search is flawed, though. I believe the term is primarily a Python term. I've certainly never encountered it before.
Actually I prefer BASIC over Python. There are some things about Python that I do not like. I absolutely hate dynamic typing along with the idea of using a variable without declaring it. I'm being forced to learn it right now and there really is no way out for me and the reason for this is because it's penetration is so deep now. It is everywhere.
However, preferences aside. Python isn't really that bad of a language and my personal tastes aside, I think it would be prudent to grab a couple ideas here and there for TwinBASIC. It really can't hurt.
I already talked about the point in previous posts, I think the debates should be more abroad, and the alternatives analyzed better, what are the implications, what pros and cons have each one, not choosing in a rush or for wrong reasons.
There should be some professional way to take that kind of decisions, I mean, to design a programming language.
But I'm a bit tired. I was tired already many posts ago.
Do whatever you want (you'll do it anyway).
You think I'm messing with you because I'm arguing for the inclusion of += family of operators?
You don't think it should have been included in TwinBASIC but I do. We have a difference of opinion. To classify a difference of opinion as me messing with you seems a bit conceited. I have zero interest in riling you up.
The truth is I'm not a yes man. Never have been and this rubs people the wrong way. They just expect me to blindly follow whatever everyone else is saying like I'm some kind of zombie. That is never going to happen. My opinions are just as valid as yours. If you can't deal with that, that is not my problem. You aren't going to bully me into submission either with "heavy stuff" as you say. SDA tried it, uncleber tried it, yet I'm still here. But you can certainly try if you want.
One final point about me "messing" with people. I don't mess with people by trying to present reasoned arguments about my points complete with code snippets and citations. If my goal was to mess with you, I'd flood your inbox with beastiality porn from 20 different accounts. And yes, I have done this to people.
I say the things I say because I actually believe them. It is not to tease people into a frenzy. I will not hold myself responsible if you choose to react poorly to it.
I really would never have imagined that supporting a universally-known operator could be so controversial until I found VBF...
its how u present your arguments.
if you say:
basic is dead, sorry but nobody is using it, "any other language" is superior basic.
and the next
I like basic, "any other language" is actually not that good
and next
I would like to put this and that into basic
so its all over the place.
I propagate for a clean, stable and strong basic.
how? to always think "what makes VB6 good?" and "what makes VB6 bad?"
and try to keep the good and improve the bad.
the "bad", how to convert it to be "good", so if we want to add a feature, first we need to think:
- the good of VB6, if we include all of it, how would it look.
if we instead use: but python do it like this, or C is doing this way. that means we are just "coping" another language instead of creating one from the existing language we have.
if basic was so bad, why are we still using it?
and its not just that VB6 is bad, but that it was abandoned by many.
just see the pro in this forum that gave us: directx, wia, gdi+, cairo to name a few,
that means VB6 is able, but someone need to give us the tools.
if VB6 was bad it shouldn't be possible. but it is, 20 years after they abandoned it.
that tells us something.
I don't care about +=, but everything else that will be added "without " the thought, "how to make it basic-like" instead of just "copy". because if you just want to copy other languages, why not just go to that language.
It has little to do with the operator. It's the fact that I'm the one supporting it. I'm just a convenient target because I personify what VB6 programmers hate most which is the abandonment of VB6 by Microsoft and the rest of the world. I'm used to it though. It's not the first time I've found myself becoming a villain although it was never my intention. It is what it is.
I get why you'd be confused. Let's see if I can clear it up. I like BASIC because it's my most used language. I've been writing BASIC code in on form or another since I was something like 10 years old. I'm comfortable with it. I'm familiar with it. This however does not mean I think there aren't better languages. Do you know how many times I've advised people in the VB.Net section to pick up C# instead? I love VB.Net but I think C# is better. I myself still use VB.Net, not because it's better but because I love it.
Let me put it this way:-
Now with regards to TwinBASIC, we are talking about attracting new talent. Our love for the language has no weight whatsoever in this. You want to attract modern programmers, then you must make it attractive. You can do this by looking at what the most popular languages are doing and assimilate ideas from there. You don't do it by trying to re-invent the wheel. You do it by following trends. As far as shorthand operators go, the trend is for modern languages to include them.Code:MeLovinBASIC <> BASICIsBetter
Does this clear things up for you about my stance?
I'm new here. There's clearly some history to these interactions, so I'll just call it as I see it.
Classic VB was abandoned by Microsoft. That's the only language they did that to. C# was a new invention (some would say a rip-off-with-improvements-of-java), and C++ was allowed to stay mostly native, with diversions and extensions for those that really wanted to use it to target .Net.
VB was kind of thrown to the wolves. All development on COM-native VB stopped in the early 2000s. If you wanted to keep current with VB, you had to move to VB.Net. And that was a big problem, because it ripped the heart out of the language.
VB should have gone the same route as C++ - basically COM-native, but with the CLR there if you wanted to opt-in. In fact, it could have been the perfect middle ground. A bridge between the two, COM by default but easy access to the CLR for those who wanted it.
But remember, this all happened in the early 2000s. Just when Longhorn was emerging. Way before Vista, plans were put in place to make Windows a managed code environment. They tried and failed to remove the COM underpinnings of Windows. But the die was cast.
So I say again - my fondest hope is that twinBASIC is the go-to COM language. The path that Microsoft didn't take. I get that you all hate VB.Net, because CLR. But it does have some nice language improvements, regardless of what it ends up targeting.
Also, it's interesting. You guys almost saw something new today. I was actually in the middle of writing an apology to the VB6 community. I brought up my contentions here with the VB6 community on Reddit and someone pointed something out to me that I never thought of before. I was going to make a post apologizing to the VB6 members with a promise to try my very best to avoid creating conflict by bringing up VB.Net in VB6 topics even in cases where it is 10000% warranted and justified. I was in the middle of writing that post until I saw baka post this:-
I took this to mean that he thinks I deserved to be called names and be degraded online simply because I hold views counter to popular opinion. I changed my mind after that. I'm not apologizing to anyone that thinks I deserved to be told that my mom should have swallowed me.Quote:
ironically u wrote that people in other forums have called u all kind of things, heavy stuff, and I wonder maybe you made them that angry with your attitude and it seems like you are seeking that here as well.
I'm not angry at baka or anything like that and I don't hate him but I also don't feel good about apologizing to people who think I deserve to be treated like sub-human trash simply because of a difference of opinion.
yeah, I get that part,
but the irregularity is what makes it hard to know where you stand. it seems like you enjoy the argument and so you send an arrow when you find a target, and thats fine if you we know where you stand.
the last post showed your stand, but soon you will change tone and we are there again.
I don't think that a language need to accommodate everyone and show "we also got the latest ice-cream taste".
the importance is to show "we can do this with TwinBasic".
when I bought my first PC, it was not because PC was superior Amiga, it was because they did have a 16bit sound card that I needed.
when I first started VB6 was not because I knew basic, I was more of a pascal guy at that time. it was because it was easy to work with the "new" windows OS, while pascal it felt too complicated in windows so I switched.
theres a lot of languages, so how can TwinBasic survive? it can't just because it shows lots of features.
the only way is a community, easy to get started, availability, sources etc, that will help the language grow
and when guys like Olaf and The trick and others start to release components that can be used to create stuff, it will spread around and eventually even companies will feel its a good idea to try it out.
that is why "fully" compatible is the good strategy here.
why? because TwinBasic will get many experiences programmers on-board for free, and that will help the language grow.
without vbforums and the "few others before they died" I wouldn't be here.
a community is important, without it, the language will die.
if you try to make TwinBasic something that I can not recognize, I will not get on-board. theres a lot of other languages out there already, like you say, Phyton. I know a bit already, as its used in the gaming community a lot. and its evolving all the time as theres a demand for it. if I create a game using Phyton I will get "accepted" by the masses, as they recognize the engine.
so, the question is, why should I take a chance on TwinBasic if Phyton is growing in the gaming community? I should just go there?
so, everything is not obvious. just give the language lots of features means nothing.
a inviting GUI, a stable IDE, lots of samples, easy to understand, a forum, experts that are online everyday to give support.
new players? not sure there will be that many before the VB6-programmers are on-board.
and for us to go on-board TwinBasic need to be at least as good as VB6 and familiar.
Here's the thing baka. I don't disagree with what you're saying here. 100% VB6 compatibility should be the core mission and I have no problem with that. All I'm saying is that it cannot hurt to look around to see what languages like Python are doing and ape some of their stuff. And I happen to think that operators like += should be included. I am not advocating for everything to be adopted, for example, it doesn't need ++, -- or any of that. But the truth is, there are a lot of good features that other language have that TwinBASIC could benefit from without sacrificing the core mission of 100% VB6 compatibility. And this will also aid in attracting new talent from other programming languages who would expect some of these things. That is all I'm saying.
@baka
That's my hope too. VB6, but better.
1. 64-bit compilation
2. Faster execution
3. Cross platform
4. Language improvements
It seems that the only one of these that's causing concern is #4. Bear in mind that the developer is extremely keen to get feedback on the GH repo, and that nothing is set in stone for the language canon until it reaches v1, which seems some way off (the GUI is still in the distance). I've heard talk of RFCs and governance, but bear in mind that this is a very small community right now - it can't really accommodate heavy governance. If you want to help guide the direction, I urge you to get involved in the GH discussions. Maybe later there can be an independent governance committee and standards approval, but for now this is a startup.
exactly, whats the point on creating twinbasic if theres no new feature.
we need all those low-level operations, but carefully thought to be as close possible the basic-language syntax.
and Im sure Wayne is doing his best to do that.
and I agree that "what are other languages doing that are great that could be useful in twinbasic",
but again, converted into basic-syntax, and carefully thought.
I see it like this:
keep VB6 spirit, everything new need to be evaluated, and if adapted, it need to be converted into basic-syntax.
what I don't like:
I like this C feature, add it now!
its like a english language.
if we start using Italian, Russian, German mixed together, it will be hard to understand:
Trapoco need gehe zu спать.
I just want to say one more thing about the "+=" debate, especially in regard to newcomers. This operator is not much different than saying 1 + 1 or 1 + 2. What is "+"? Shouldn't a true Basic force us to write X = 1 Plus 1? Perhaps we should make it even more natural English and enforce a syntax like "X Equals One Plus One". Of course not, because we learned as children what symbols like +, =, 1, 2, 3, etc.. mean. I have X school age children who might eventually be part of a new generation of programmers coming to a new generation of Basic. They are taught some programming at school and they have no problem understanding the += operator. AFAIAC it's done, the programming world has decided that it's a useful operator and whether you like it or not, you're wrong if you're on the other side of this one. It's like getting mad about the letter W. You've already lost, so pick a fight you can still win.
I absolutely get that. I've been in the C# world for nearly 2 decades now, but I got my start in VBA, and then VB6.
I understand the BASIC ethos. The B stands for beginner after all - "Make it easy for humans to follow". I wouldn't want to propose anything that prevented that. But generics, overloads, and delegates do exist these days, and to pretend they don't does learners a disservice.
You have no idea what a huge deal this is. VB.Net introduced me to so many new concepts I had never imagined I'd ever be able to grasp or find useful.
A big example for me is templates in C++. For years I'd have so much trouble understanding them. Like what is their point, why are they so popular, how can I use them, why didn't they just do it the old fashion way. They used to drive me crazy because they were so alien and confusing to me. When I moved to VB.Net which introduced me to generics, I was finally able to grasp them. This is such a fantastic point you made here.
I will use
a = a + 2
but I could do
a += 2
as well, if its available.
I told u, I dont care about += its quite simple stuff, and easy enough to understand.
but u need to be careful since that kind of syntax can open up a lot of more complicated one.
anyway I will keep using a = a + 2 since its easy to understand.
for me it means
a = will became a + 2
so its not algebra a = a
a += 2 means:
a plus is equal to 2
or
a plus will became 2
or
a plus, (plus what?) is equal to 2
Despite what I said in my last post, I do think feature adoption in a Basic language should be relatively slow - maybe the slowest of any language. Being on the forefront of fashionable syntax is not a good idea. That said, adopting the best time-tested ideas from other languages makes sense, especially if you want to appeal to a new generation of programmers. After all, Basic uses inventions like these.
I can co-sign this. Despite what everyone might think, I'm not advocating TwinBASIC be turned into C#. I just think there should be a common baseline of "must haves" for any language in 2021 and the += family of operators should be among them. Async/Await would be another as we live in a multi-core world now. Both of these can be implemented without sacrificing VB6 compatibility.
I'm not sure I've ever come across the term 'augmented assignment operator' (until I just googled it).
I've known them as 'compound assignment operators'.
In real life though surely everyone just calls them assignment operators.
I'd suggest just googling 'assignment operators' would give less Python-biased results.
Careful... Async/Await is very, very tricky. It pretty much rewrites your code into Begin/End methods. If it finds it needs to do that inside a loop, it has to write an entire state machine for you to capture all the variables you might be using after the await. It's... fiendish.
It could easily divert a single developer (no matter how awesome) into a rabbit hole. Microsoft likely spent millions on it to fix all the edge cases.
The feature is already there then what is the debate all about? For it to be removed from TB? You guys have debated for pages in this thread, perhaps those who dislike the feature may take it to the creator of TB instead of wasting time debating here.
Oh I'm aware of how it works and how complicated it is internally but it has already become apart of the modern programming lexicon. However, owing to it's immense complexity, I can accept that the developers may have not have the resources to tackle it and on that grounds it would be prudent to avoid attempting to implementing it in TwinBASIC.
A long, long, time back, the comic strip B.C. ran a strip where the one-legged character Willy realized that he hated the letter W and anything that started with the letter W (an obvious issue). So, hating the letter W is a thing. I'm curious as to whether or not you picked that letter at random, or if you knew that hating the letter W was a thing?
Um, I think you just proved my point? The math they teach at (high) school is equations. Not assignments.
Have you seen the symbols used in higher math? I couldn't begin to understand them. You need special symbol sets just to approximate them. To submit a paper you need LaTeX. And time. Lots and lots of time.
Actually, that's NOT what I remember from school. In school, you are taught this:
1 + 2 = a
b + 1 = a
1 + a = a
It's only in programming that I have seen the assignment go from right to left. In school it was always left to right. That might be what confuses non-programmers, since we reverse what they are used to seeing.
I have to concede in part.
Now I remember that when I begun learning programming, a = a + 1 seemed a bit strange. Because a = a, not = a + 1.
Still, the notation is familiar.
OK, but that is something very specialized, not taught at school (where most of the new programmer will come from).
Yes guys, I already said that the last line was a mistake.
I have to leave it, at least for now. I'm too tired and make mistakes.
LOL :) I picked W for personal reasons I guess. I also have a pre-school aged child who is currently obsessed with the (English) alphabet. We have an almost non-stop ABC stuff going on around here. It gave me plenty of opportunity to think about how illogical it seemed that we call it double-U instead of double-V. I didn't investigate too far, but it seemed to fit the current discussion about a hatred of certain symbols.
While we're here, I have an irrational hatred of leading underscores in names (I think it means something in C or C++? Maybe even double-underscores mean something? It drive me nuts). Even naked underscores bother me (e.g. something like (a, _, b) = Something). The weird part is that I'm fine with internal underscores and use them all the time (so something like This_Is_A_Variable scans fine for me). What can I say, I'm an irrational meat computer doing his best.
I'm ignoring the mistake, but math is absolutely taught differently at younger grades here. There is a certain amount of straight arithmetic like 1 + 1 = 2, there is also a lot of focus on different approaches to finding answers to questions like 532 + 129 = ?. When I was a kid you would do right-left math, but now they do left to right math. So, start with an estimate (500+100+ a bit left over = around 650?). Then do the actual math: 500+100 = 600, 30+ 20 = 50, 2+9= 11. 600+50= 650. 650+11 = 661. Pretty simple, and I find it works quite well across a wide range of large-ish numbers. The way I was taught I'd be carrying numbers and having to maintain a much larger mental state along the way working out a precise answer the whole way through. Interestingly, I started using the left-right approach myself after many years of programming financial(ish) software. It was faster to scan and do quick addition that way compared to the way I was taught.
But they also teach programming now. So things like variable assignments come more naturally at a younger age. All of us here can figure out the answer to this puzzle easily, but not everyone in the general population can.
It's not the symbols that are difficult, it's the idea of a symbol holding a value, and the symbol's value being modifiable by other symbol's values that is difficult. It's second nature to us a programmers, but it's a major mental leap for any newcomer. IMO, it's a much larger mental leap than the meaning of += versus + variable.Code:X = 1
Y = 2
X = X + Y
Does X equal:
A) 1
B) 2
C) 3
It was just an example.
Operations with letters are not taught in the first grades.
I think all around the world math must be taught more or less the same way, at least in Occident.
There are trends that change over the years, but I think they change everywhere. And more now, that everything is globalized.
why are you trying to compare algebra with how basic is assigning values, strings and objects?
we could have an entire discussion alone about that, tell me any language that is strictly following school methodology.
VB is using A = something, as already explained before, " Let A be B ". and its part of VB6 syntax.
its like you are trying to tell that "yes, we found something to complain about and we will use it".
and your premise is that because VB6 is faulty, it means everything we add is ok. so lets add:
+= , -= , *= , /= , %= , <<= , >>= , &= , ^= , |= , ?: , || , && , == != , < <= > >= , () [] -> . ++ - - etc.
why not, its something you learn in school already.
The Problem people have with "a = a + 1" in Basic, is that Basic has overloaded the "="-operator:
Assignment AND equality/comparison
Look at other languages
a) Pascal: "=" equal - ":=" assign
b) C/C++: "==" equal - "=" assign
.
.
.
.
I'm not advocating to change it! It's the way Basic is.
I'm still staying with my initial proposal: Offer people to write their own operators
Zvoni yeah I think you are on the right track.
maybe even a IDE setting.
we can pick an option where we can change between VB and C Operation modes.
that way people can choose.
the overloaded "=" operator is what I like with VB6. I don't want := or ==, if I liked that I would use that language instead.
Baka, no need for an IDE setting or whatever.
Since Wayne has already implemented those C-ish operators it's a fait accompli.
No use to cry over spilt milk.
TwinBasic offers NEW (intrinsic) operators we didn't have in vb6? Great! (ShiftLeft etc.)
Did we need those C-ish intrinsic operators, when there is a perfectly valid way of doing things in a "Basic" way? Not really!
BUT, offer to write your own operators, and people can define their C-ish operators to their hearts contents
Now that would be hilarious and explains why cries to "keep it more BASIC-ish" are so funny in this thread.
In most C/C++ compilers there is built-in ASM support which 99.99% of C/C++ programmers never use but I've never heard anyone complaining about it being available like some VB6 developers would like to keep the vNext language simple (and stupid).
cheers,
</wqw>
Rather than all this bickering, why not create a forum poll on a specific language variation that you would like to have, a poll on each that we can bothered to raise. Then we can simply vote on it.
The results could be maintained and could form a sort of blueprint-for-the-BASIC-that-has-yet-to-come.
It wouldn't be binding of course but it might act as a guide to the desires of those who are interested, if nothing more.
Personally, I find that having two or more languages under one's belt and being relatively familiar in both gives you a perspective that change is not always wrong and that compatibility in itself is useful. I often find myself creating polyfills to create missing or obsolete VB6 functions when programming in VB.NET and sometimes even when using .js - and vice versa.
Curly brackets, semi colons, BEGIN and END statements, ==, += from C, .js or Delphi all make some sort of sense when you have to program in them for a while and become familiar - and not so alien. Sometimes BASIC is more understandable in its brevity, certainly when compared to Delphi. Most often though, it is more verbose but as a result quite understandable, certainly when compared to C.
BASIC is a good place to start but is important to remember to maintain the ethos of being a beginner language capable of more or less anything with a fair wind. If we just follow that mantra but also allow flexibility. we are still in a good place.
Your point?
If someone with such "own" syntax asks for support, he can get it in the "official basic" way.
Would be the same as: "Why is my Function not working?" showing only the call to it, but not the code of it.
And now i'm out of this discussion.
It's there, live with it.
LOL! I didn't agree to one thing, showing the reason, that is something obvious, and you get offended?
Of course if someone inherits a projects from someone else, in a new job or wherever, and comes to a forum with an unknown custom syntax that the previous programmer invented, this poor new programmer won't get any help.
I don't mean you particularly Zvoni, but reading other posts from other people it seems that some people think that discussing something is bad, it is fighting, that one have to win and others to lose.
What wrong minded... how can you improve something if you don't evaluate each option, brainstorming, having people that think in one way and others in another?
Ah, Ed.
has nothing to do with you.
I respect opinions of others (even if i don't agree with them), and i'm definitely not offended, if someone disagrees with me, as long as he/she can provide plausible reasons from their point of view (which you did).
And:
Discussion <> Fight
The biggest problem with an IDE setting is what happens if you open a project from someone who has their IDE set up differently to yours? Would the code still compile if your IDE was set to not use the += syntax and their code was written that way? If that would be a compile failure then you have instantly caused fragmentation amongst the users, if it would compile then why bother with an IDE setting anyway? Just a thought, probably something Wayne would be best to answer is if tB supports .editorconfig files as a way of managing this kind of thing.
The problem you get with that is somebody could then make the += operator do something non-obvious. That could result in the following two examples doing two completely different things...
andCode:Dim i as Integer = 10
i = i + 5
The only way you would be able to tell while reading the code is to look at the source of an operator and see exactly what it does. I have seen code like that in C++ (many, many years ago thankfully) that resulted in a very hard to track down bug, lots of swearing, and an utter inability to understand why the original dev chose to do things that way.Code:Dim i as Integer = 10
i += 5
Making += a shorter version for an addition and an assignment is a much safer option.