Jump to content

Recommended Posts

I think I have enough for now. For me Rebol has a lot of outdated concepts that didn't stand test of time or got redesigned in modern languages. It seems that Meta is repeating many of the issues Rebol had, breaking backwards compatibility even in the basic keywords (which will prevent code reuse from Rebol). I also do not understand why A8 is the first platform to target, when the language is not going to allow pleasant nor performant programming for this machine (I think for a long time). Also lack of any documentation and constant bugs in the compiler are nothing but discouraging. Reading the comments from Kaj neither me (nor the others here) are the target audience for the lang, so I'm ending my participation in discussions here. Lets see in a few years if it's going to be any better. Kaj, wish you luck and more appropriate audience.

Edited by ilmenit
1 hour ago, Kaj de Vos said:

Meta chooses for the human-friendly way.

But shouldn't it be programmer-friendly?

 

Sure, it can be mitigated by adding or subtracting 1 every time I need to use my variable in a math calculation or need the result to index a series, but that's not programmer-friendly IMHO.

 

 

  • Like 1

If you try it for a while, you will see that it's not like that. It's very seldom that you need to compensate for it.

 

On the other hand, in C-like languages, the range of a series of length n is 0 to n - 1. This constantly needs compensation and gives the world many off-by-one errors.

21 minutes ago, Kaj de Vos said:

If you try it for a while, you will see that it's not like that. It's very seldom that you need to compensate for it.

 

On the other hand, in C-like languages, the range of a series of length n is 0 to n - 1. This constantly needs compensation and gives the world many off-by-one errors.

I have to disagree here.  It's languages that incorrectly start counting at 1 that are the cause for off by one errors.

3 hours ago, Kaj de Vos said:

On the other hand, in C-like languages, the range of a series of length n is 0 to n - 1. This constantly needs compensation and gives the world many off-by-one errors.

Well, I'd say it never (until you mix it with 1-based language library, but who does it?) needs compensation and in languages exist < operator for [0,n) iteration. 1-based indexing seems to be one of the outdated (before year 2000) concepts in programming. 

 

1-based languages are good for specific domains (text processing or math with langs like Matlab or Julia) that have high-level collections, but on Atari you need to work closely with hardware, arrays and memory pointers and addresses, including aligned ones. In Atari EVERYTHING is 0-based (in Memory Map, in OS, in DOSes, all hardware registers, PMG, Pokey channels, graphics modes, bit counting, even there is Zero Page - not One Page - in CPU addressing). Then try to work with e.g. RMT player, some compression routine etc. It's not going to be confusing and error prone at all ;-) 

I'm also curious how indexing of bytes on specific memory page will work, when with 8bit byte you can index values 0-255, not 1-256. Will it require using 16bit variable?

Edited by ilmenit
  • Like 2

Ah, so ALGOL saw the error of its ways after fourty years. The trend seems to be in the other direction than you think.

 

All the big math languages start counting with one, so the argument for math seems to be clear.

 

That leaves the argument for hardware programming. Keep in mind that Meta is cross-platform and will be safe, so that is the default. For hardware programming on small platforms, it's not hard to shift indexing to 0-based to increase performance. I have an example coming up.

16 hours ago, ilmenit said:

I'm also curious how indexing of bytes on specific memory page will work, when with 8bit byte you can index values 0-255, not 1-256. Will it require using 16bit variable?

I also thought about it when I was filling arrays/memory with values in starfield example.

1 hour ago, zbyti said:

I also thought about it when I was filling arrays/memory with values in starfield example.

1-based indexing is for sure easier for people who never did any programming (for kids the first car in a row is number 1, not 0) and generally domains out of computer science. I'm not aware of other benefits than feeling "natural". And then you move to computer science domains where things are represented by bits, bytes, addresses and offsets and with 1-based indexing suddenly programs are getting more complicated and less performant. To name a few areas that aren't "edge cases" - data compression, audio-video streaming, encryption, graphics processing, computer security, highly optimized algorithms. In computer science you generally start counting from 0 (e.g. RGBA colors, IP addresses, ASCII/Unicode), not only for indexes of arrays. Starting counting from 1 is just a waste, because you are "losing" the very first value in binary representation.

Edited by ilmenit
19 minutes ago, Kaj de Vos said:

Nothing is lost. You act as if I removed zero from the language, but that is not the case.

The benefit of feeling natural is huge. That should be obvious.

You did not remove zero from the language and I do not "act like that", whatever you mean. I expressed my opinion that 1-based language is not perfect for many domains of computer science. Your opinion is that "feeling natural" by counting from 1 is more important and previously that "normal programmers" are not your target audience. All is clear, at least for me.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...