* [ruby-core:120703] [Ruby master Feature#21041] Enum class
@ 2025-01-15 19:54 dsisnero (Dominic Sisneros) via ruby-core
2025-01-15 20:13 ` [ruby-core:120706] " alanwu (Alan Wu) via ruby-core
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: dsisnero (Dominic Sisneros) via ruby-core @ 2025-01-15 19:54 UTC (permalink / raw)
To: ruby-core; +Cc: dsisnero (Dominic Sisneros)
Issue #21041 has been reported by dsisnero (Dominic Sisneros).
----------------------------------------
Feature #21041: Enum class
https://bugs.ruby-lang.org/issues/21041
* Author: dsisnero (Dominic Sisneros)
* Status: Open
----------------------------------------
Enumerations (Enums) represent a critical abstraction in modern software design, offering significant advantages in type safety, code readability, and system-wide consistency. Most contemporary programming ecosystems—including Java, C#, Python, and Kotlin—provide native enum support, recognizing their fundamental value in representing finite, well-defined sets of values.
Beyond basic type definition, enums are increasingly central to interoperability across serialization frameworks. Industry-standard specifications like OpenAPI, Protocol Buffers, and gRPC leverage enums as a canonical way to define constrained value sets, enabling robust code generation and cross-platform compatibility.
Implementing a comprehensive Enum class would:
- Standardize constant representation
- Facilitate seamless code portability
- Enable automatic code generation for documentation and client libraries
- Enhance type safety and compile-time validation
- Improve developer productivity through clear, self-documenting code structures
By adopting a robust enum implementation, we can align our development practices with contemporary software engineering principles, reducing complexity and increasing overall system reliability.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:120706] [Ruby master Feature#21041] Enum class
2025-01-15 19:54 [ruby-core:120703] [Ruby master Feature#21041] Enum class dsisnero (Dominic Sisneros) via ruby-core
@ 2025-01-15 20:13 ` alanwu (Alan Wu) via ruby-core
2025-01-15 20:22 ` [ruby-core:120707] " dsisnero (Dominic Sisneros) via ruby-core
2025-01-15 22:15 ` [ruby-core:120708] " ufuk (Ufuk Kayserilioglu) via ruby-core
2 siblings, 0 replies; 4+ messages in thread
From: alanwu (Alan Wu) via ruby-core @ 2025-01-15 20:13 UTC (permalink / raw)
To: ruby-core; +Cc: alanwu (Alan Wu)
Issue #21041 has been updated by alanwu (Alan Wu).
Without any concrete design proposal and implementation, I'm afraid this boils down to "enums in ruby would be nice". I think successful feature proposals need more details than this.
... Am I talking to an LLM?
----------------------------------------
Feature #21041: Enum class
https://bugs.ruby-lang.org/issues/21041#change-111540
* Author: dsisnero (Dominic Sisneros)
* Status: Open
----------------------------------------
Enumerations (Enums) represent a critical abstraction in modern software design, offering significant advantages in type safety, code readability, and system-wide consistency. Most contemporary programming ecosystems—including Java, C#, Python, and Kotlin—provide native enum support, recognizing their fundamental value in representing finite, well-defined sets of values.
Beyond basic type definition, enums are increasingly central to interoperability across serialization frameworks. Industry-standard specifications like OpenAPI, Protocol Buffers, and gRPC leverage enums as a canonical way to define constrained value sets, enabling robust code generation and cross-platform compatibility.
Implementing a comprehensive Enum class would:
- Standardize constant representation
- Facilitate seamless code portability
- Enable automatic code generation for documentation and client libraries
- Enhance type safety and compile-time validation
- Improve developer productivity through clear, self-documenting code structures
By adopting a robust enum implementation, we can align our development practices with contemporary software engineering principles, reducing complexity and increasing overall system reliability.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:120707] [Ruby master Feature#21041] Enum class
2025-01-15 19:54 [ruby-core:120703] [Ruby master Feature#21041] Enum class dsisnero (Dominic Sisneros) via ruby-core
2025-01-15 20:13 ` [ruby-core:120706] " alanwu (Alan Wu) via ruby-core
@ 2025-01-15 20:22 ` dsisnero (Dominic Sisneros) via ruby-core
2025-01-15 22:15 ` [ruby-core:120708] " ufuk (Ufuk Kayserilioglu) via ruby-core
2 siblings, 0 replies; 4+ messages in thread
From: dsisnero (Dominic Sisneros) via ruby-core @ 2025-01-15 20:22 UTC (permalink / raw)
To: ruby-core; +Cc: dsisnero (Dominic Sisneros)
Issue #21041 has been updated by dsisnero (Dominic Sisneros).
I wrote a proposal with my own words and had an llm make it sound better. Yes, it needs concrete implementation but put it here for feedback
----------------------------------------
Feature #21041: Enum class
https://bugs.ruby-lang.org/issues/21041#change-111541
* Author: dsisnero (Dominic Sisneros)
* Status: Open
----------------------------------------
Enumerations (Enums) represent a critical abstraction in modern software design, offering significant advantages in type safety, code readability, and system-wide consistency. Most contemporary programming ecosystems—including Java, C#, Python, and Kotlin—provide native enum support, recognizing their fundamental value in representing finite, well-defined sets of values.
Beyond basic type definition, enums are increasingly central to interoperability across serialization frameworks. Industry-standard specifications like OpenAPI, Protocol Buffers, and gRPC leverage enums as a canonical way to define constrained value sets, enabling robust code generation and cross-platform compatibility.
Implementing a comprehensive Enum class would:
- Standardize constant representation
- Facilitate seamless code portability
- Enable automatic code generation for documentation and client libraries
- Enhance type safety and compile-time validation
- Improve developer productivity through clear, self-documenting code structures
By adopting a robust enum implementation, we can align our development practices with contemporary software engineering principles, reducing complexity and increasing overall system reliability.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:120708] [Ruby master Feature#21041] Enum class
2025-01-15 19:54 [ruby-core:120703] [Ruby master Feature#21041] Enum class dsisnero (Dominic Sisneros) via ruby-core
2025-01-15 20:13 ` [ruby-core:120706] " alanwu (Alan Wu) via ruby-core
2025-01-15 20:22 ` [ruby-core:120707] " dsisnero (Dominic Sisneros) via ruby-core
@ 2025-01-15 22:15 ` ufuk (Ufuk Kayserilioglu) via ruby-core
2 siblings, 0 replies; 4+ messages in thread
From: ufuk (Ufuk Kayserilioglu) via ruby-core @ 2025-01-15 22:15 UTC (permalink / raw)
To: ruby-core; +Cc: ufuk (Ufuk Kayserilioglu)
Issue #21041 has been updated by ufuk (Ufuk Kayserilioglu).
I think the main feedback is that a feature request needs to fulfill the criteria listed here: https://github.com/ruby/ruby/wiki/How-To-Request-Features
As @alanwu said, without a concrete design proposal, there is nothing to really discuss, since the devil is in the details.
----------------------------------------
Feature #21041: Enum class
https://bugs.ruby-lang.org/issues/21041#change-111542
* Author: dsisnero (Dominic Sisneros)
* Status: Open
----------------------------------------
Enumerations (Enums) represent a critical abstraction in modern software design, offering significant advantages in type safety, code readability, and system-wide consistency. Most contemporary programming ecosystems—including Java, C#, Python, and Kotlin—provide native enum support, recognizing their fundamental value in representing finite, well-defined sets of values.
Beyond basic type definition, enums are increasingly central to interoperability across serialization frameworks. Industry-standard specifications like OpenAPI, Protocol Buffers, and gRPC leverage enums as a canonical way to define constrained value sets, enabling robust code generation and cross-platform compatibility.
Implementing a comprehensive Enum class would:
- Standardize constant representation
- Facilitate seamless code portability
- Enable automatic code generation for documentation and client libraries
- Enhance type safety and compile-time validation
- Improve developer productivity through clear, self-documenting code structures
By adopting a robust enum implementation, we can align our development practices with contemporary software engineering principles, reducing complexity and increasing overall system reliability.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-01-15 22:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-15 19:54 [ruby-core:120703] [Ruby master Feature#21041] Enum class dsisnero (Dominic Sisneros) via ruby-core
2025-01-15 20:13 ` [ruby-core:120706] " alanwu (Alan Wu) via ruby-core
2025-01-15 20:22 ` [ruby-core:120707] " dsisnero (Dominic Sisneros) via ruby-core
2025-01-15 22:15 ` [ruby-core:120708] " ufuk (Ufuk Kayserilioglu) via ruby-core
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).