Skip to content

Conversation

@avivcarmis
Copy link
Contributor

No description provided.

@avivcarmis avivcarmis linked an issue Jan 4, 2021 that may be closed by this pull request
@avivcarmis
Copy link
Contributor Author

Screen Shot 2021-01-04 at 20 15 51

@avivcarmis
Copy link
Contributor Author

hash function taken from here

@dorilahav
Copy link
Contributor

Would suggest to also use a dictionary because the hash is not very long.
There is a good chance that a whole project including some libraries would have more than 10000 functions and variables so it could actually have 2 functions with the same name.

@dorilahav
Copy link
Contributor

A nice and clean solution might be to just create a counter and use it's value to name variables and functions.

@elisherer
Copy link

@dorilahav , it's important to stay deterministic,
I think it would be a good idea to use both hash and transliteration for readability sake.

function $chava_46165799_lbrch($chava_1432970484_mbvrch) {
    console.log('היוש, ' + $chava_1432970484_mbvrch);
}
$chava_46165799_lbrch('עולם');

WDYT?

@avivcarmis
Copy link
Contributor Author

@dorilahav , it's important to stay deterministic,
I think it would be a good idea to use both hash and transliteration for readability sake.

function $chava_46165799_lbrch($chava_1432970484_mbvrch) {
    console.log('היוש, ' + $chava_1432970484_mbvrch);
}
$chava_46165799_lbrch('עולם');

WDYT?

I agree

@avivcarmis
Copy link
Contributor Author

@dorilahav I do agree with @elisherer that we want determinism. I also agree that we want to avoid collisions of hash result. I think that a combination of the two should be safe enough for the purposes of חווה סקריפט.
closing in favour of #36

@avivcarmis avivcarmis closed this Jan 6, 2021
@avivcarmis avivcarmis deleted the fix/alphabet2 branch January 6, 2021 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

באג ביצירת פונקציות עם שמות דומים

3 participants