Coder Social home page Coder Social logo

Comments (22)

ruv avatar ruv commented on June 11, 2024 14

(A) by default (initially) a system should be case sensitive

from discussion.

ruv avatar ruv commented on June 11, 2024 14

(B) by default (initially) a system should be case insensitive

from discussion.

ruv avatar ruv commented on June 11, 2024 14

(C) a system should have ability to turn on/off case sensitivity

from discussion.

ruv avatar ruv commented on June 11, 2024 12

(D) a system should support case insensitivity in ASCII

from discussion.

ruv avatar ruv commented on June 11, 2024 10

(E) a system should support case insensitivity in Unicode

from discussion.

ruv avatar ruv commented on June 11, 2024 8

(F) a system should provide a hybrid case-sensitivity mode: if exact match is not found, try to find in case insensitive mode

from discussion.

ruv avatar ruv commented on June 11, 2024 8

(G) a system should provide a hybrid case-sensitivity mode: if exact match is not found, try to find the name in upper case

from discussion.

massung avatar massung commented on June 11, 2024 4

So, not an above, but my choice is:

(H) It doesn't matter, but the documentation should likely adhere to certain "standards". If the documentation is referencing words in ALLCAPS, then it's case-insensitive. If implementation is case-sensitive, then all core words should be lowercase where it's reasonable to do so.

from discussion.

forthy42 avatar forthy42 commented on June 11, 2024 2

Gforth has case sensitive wordlists and vocabularies, if you need those. Most common this is used for C bindings, because C is a case sensitive language.

from discussion.

GarthWilson avatar GarthWilson commented on June 11, 2024 1

from discussion.

howerj avatar howerj commented on June 11, 2024 1

I thought one of the main the ideas of Forth was simplicity, and simplicity of it's implementation, as such I never understood why Forth had case insensitivity at all. It is an extra piece of complexity. Some people may like insensitivity, others may not. What is not undeniable is that extra complexity no matter how tiny.

As such, I'm voting for A:

(A) by default (initially) a system should be case sensitive;

But only because that best approximates what I think is best.

Option (E) does not even make sense!

from discussion.

mgcaret avatar mgcaret commented on June 11, 2024

For OF816 I chose to be tied to Open Firmware's specification, so I am stuck with case-insensitivity (which I prefer).

It's certainly not the only way to do things, and I made it open source so if someone wants to make a case-sensitive fork, they can. The great thing about all the Forths out there is that you can either find one you like, bend one to your will, or write your own if the former options don't work.

from discussion.

MitchBradley avatar MitchBradley commented on June 11, 2024

My forth systems are all configurable. I prefer insensitive because I think that people are bad at remembering the details of capitalization, different natural languages have different capitalization rules, natural language words that differ only in capitalization are usually (with a few exceptions) either not considered different or people don't treat them as different in practice, and capitalization differences are hard to convey verbally. It is just a recipe for confusion to have two different identifies that are spelled the same except for case. Also, think about how tedious it is to tell someone a WiFi password with mixed case. You have to stop all the time to say capital this, lower case that, etc.

from discussion.

massung avatar massung commented on June 11, 2024

I never understood why Forth had case insensitivity at all

When working with an FFI, case-sensitivity matters. And unless you want to try and come up with alternate names for foreign functions that are case-insensitive, you need it.

from discussion.

TG9541 avatar TG9541 commented on June 11, 2024

Since users asked for it, STM8 eForth is case-insensitive by default but it can be configured to be case-sensitive, e.g. to reduce the binary size a bit. The docs therefore use upper-case core words.
👍 🚀

from discussion.

scherrey avatar scherrey commented on June 11, 2024

from discussion.

paraplegic avatar paraplegic commented on June 11, 2024

My heritage, of C/Unix tells me that you specify what you want, so case sensitivity explicitly says what you want. The law of unintended consequences with respect to calls, links and various has bitten numerous times where an unintended link causes problems in a running system ... If case weren't important, then we wouldn't have two of them :-)

from discussion.

CCurl avatar CCurl commented on June 11, 2024

IMHO, the system should be, by default case sensitive. But the option to be able to tell it to be case-insensitive would be really nice. I like the idea that it tries the case-sensitive search first, and if that fails, then try it case-insensitive.

from discussion.

crcx avatar crcx commented on June 11, 2024

The question is: What is your preferred options regarding case-sensitivity for definition names resolving?

I use case sensitive only. In my system, I use differing case to provide a visual feedback on what words are:

word-names  are lowercase
VariableNames  are titlecase
CONSTANTS are uppercase

from discussion.

mitra42 avatar mitra42 commented on June 11, 2024

My preference is for case sensitivity - which I'm used to in other languages I work in - foobar is not the same as FooBar .

I certainly disagree strongly with @scherrey and @massung :-) . IMHO standard words should be UPPER CASE and user-defined (non standard) should use lower, or mixed case.

from discussion.

GeraldWodni avatar GeraldWodni commented on June 11, 2024

tl;dr: Forth has extendable syntax, therefor case matters less than in other languages.

Typical Forth programs (written after gaining some experience in Forth; also what most books will teach you) will create a domain specific language to solve the task at hand. This differs a lot from other common languages where it is difficult to impossible to extend the syntax of the language itself.

When I started Forth I was strongly opposed to being case-insensitive as I was so used to case-sensitivity from all the other languages I knew. But the more I used it and saw code being written by others (remember to read other people's code to better yourself, not only reflect upon your own experience and force it on Forth), the more I became to see Forth more like SQL (bad example, cannot think of a closer one), where you can use the case if you want to emphasize.

Forth reads very differently because of its ability to change the syntax, you want a private word? in python you might go _soopersecret in Forth (soopersecret) looks much cleaner. You are not limited to alphanumerical Characters and a handful of punctuations in Forth, use-(what/how)-you_LIKE-to-name-your_#words.

That all being said IMO systems should be case-insensitive by default and have the option to change that preferably on a wordlist bases - FFIs and especially C being the obvious reasons for that. This is what most common systems do since ages.

from discussion.

phillipeaton avatar phillipeaton commented on June 11, 2024

I converted my instance of Camel Forth to be case insensitive as it was driving me insane having to re-enter failed commands. I don't think having the ability to name two different things with pretty much the same name is as advantageous as not having to re-enter commands.

from discussion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.