Can we stop this heresy once and for all?

Hi,

I just spent one hour trying to debug a variable that was not set, before realizing I accidentally created a variable with the same name

now why did UE4 editor did not warn me about this ?

simplified example, I have a lot more variables in my blueprint, which made me finding the issue a bit more complicated
image

that laxity concerning variables and functions naming convention is just ludicrously annoying

I knew it would cause problems at some point, when I noticed that couple of years ago
… and here it is in it’s magnificent glory

I mean it completely annihilates the efforts of having a warning when 2 variables spells exactly the same, doesn’t it ?

just my 2 cents

image

1 Like

Go for C++ have fun with pointers.

Seriously adopt some naming convention and stick to it.

6 Likes

Idk, just don’t make two variables with the same names. Just organize your variables, with a junk variable folder, and use that.

2 Likes

SomeVariable vs Some_Variable? :eyes:

1 Like

To be fair, the variables don’t have the same name.
One has a space the other doesn’t.

6 Likes

The Editor blueprint nodes display them the same way though I think that is what this rant is about.

I also never liked that Nodes get auto formatted.
Some Variable = Some Variable
Some_Variable = Some Variable
SomeVariable = Some Variable

1 Like

If you are a coder and you label your variable as “somevariable” (or any derivation there of that causes issues)

  1. stop calling yourself a coder.
  2. take some coding classes.

Literally the first thing any course, book, or introductory tutorial covers is how to properly name your variables…

2 Likes

Lmao, I sometimes just name a variable test and then delete it, though usually if I’m gonna keep using it I’ll just name it normally

maybe you started programming a couple of months ago…

why would variables contain spaces at all ?

it should not

problem solved

You wouldn’t call yourself anything if you started a couple of months ago. Even the most inflated and pompous ego in the world would realize they don’t know jack 2 months in…
In which case, see pint #2…

This is the point.
The autorenaming is unbelievable.

A true coder will never accept auto renaming.

1 Like

Uncheck “Show Friendly Variable Names” in editor preferences.

6 Likes

Good to know. Never knew that was an option thanks.

1 Like

Thank you for that.
i suddenly need to poop.

1 Like

but does it forbid spaces when we input a variable name ?

image

if you have problems with the spaces you can use the automatic system it never fails

In reality, Spaces should be forbidden no matter what really.

Sure BP does it’s own thing, but spaces in variable names are just confusing for everyone/everything.

I think we can all agree on that. Even people who have never coded before…

That said, what is this “automatic system”?
Will it read my mind and create the correctly typed variable for me? :stuck_out_tongue_winking_eye:

1 Like

that’s not the point, I know camel case/pascal case and underscores

the issue is that for some reason I had two variables, usualy I dont use spaces

but here we are

No, it still allows spaces, as well as these characters:
image

If you don’t want spaces, just don’t put spaces.

Considering visual scripting isn’t written coding, it makes sense that they would allow spaces & other characters in variable names because you don’t need spaces & symbols to separate parts of code. Whether you should actually use a space or other symbols is up to you; it’s a freedom, not a necessity.

1 Like

Yes!

If the variable names arent i or foo, you’re just a poser trying to look good!

1 Like