Skip to content

Commit 1d5a680

Browse files
bishaboshajulienrf
authored andcommitted
mark structural types as Scala 3 only
1 parent 4c77b06 commit 1d5a680

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

_overviews/scala3-book/types-structural.md

+6
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,18 @@ languages: [ru, zh-cn]
66
num: 56
77
previous-page: types-opaque-types
88
next-page: types-dependent-function
9+
scala3: true
10+
versionSpecific: true
911
---
1012

1113
{% comment %}
1214
NOTE: It would be nice to simplify this more.
1315
{% endcomment %}
1416

17+
_Scala 2 has a weaker form of structural types based on Java reflection, achieved with `import scala.language.reflectiveCalls`_.
18+
19+
## Introduction
20+
1521
Some use cases, such as modeling database access, are more awkward in statically typed languages than in dynamically typed languages.
1622
With dynamically typed languages, it’s natural to model a row as a record or object, and to select entries with simple dot notation, e.g. `row.columnName`.
1723

0 commit comments

Comments
 (0)