Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
pp:2025:scala:l06 [2025/04/09 22:21] cata_chiru |
pp:2025:scala:l06 [2025/04/09 22:22] (current) cata_chiru |
||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ===== 6.1 A small string DSL ===== | ===== 6.1 A small string DSL ===== | ||
| + | |||
| + | <note warning>For this laboratory, you will need to have a scala version >= 3.0.0, only starting from version 3.0.0 is the keyword "extension" available.</note> | ||
| In this section we will extend the scala ''String'' class with several operators that implement useful string functions, effectively obtaining a small string-specialized [[https://en.wikipedia.org/wiki/Domain-specific_language|DSL]]. | In this section we will extend the scala ''String'' class with several operators that implement useful string functions, effectively obtaining a small string-specialized [[https://en.wikipedia.org/wiki/Domain-specific_language|DSL]]. | ||
| Line 17: | Line 19: | ||
| <note> | <note> | ||
| Reminder from the DSL (Domain-Specific Language) Course: | Reminder from the DSL (Domain-Specific Language) Course: | ||
| - | |||
| - | |||
| - | <note warning>For this lab, you will need to have a scala version >= 3.0.0, only starting from version 3.0.0 is the keyword "extension" available.</note> | ||
| <code scala> | <code scala> | ||